Enforce coding styles (#2377)
This commit is contained in:
parent
85b7db561b
commit
4b17f38b2d
|
@ -2,22 +2,22 @@ using System;
|
|||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string message = "dotnet-bot: Welcome to using .NET Core!";
|
||||
|
||||
if (args.Length > 0)
|
||||
|
||||
if (args.Length > 0)
|
||||
{
|
||||
message = String.Join(" ",args);
|
||||
message = string.Join(" ", args);
|
||||
}
|
||||
|
||||
Console.WriteLine(GetBot(message));
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetBot(string message)
|
||||
{
|
||||
string bot = $"\n {message}";
|
||||
bot += @"
|
||||
public static string GetBot(string message)
|
||||
{
|
||||
string bot = $"\n {message}";
|
||||
bot += @"
|
||||
__________________
|
||||
\
|
||||
\
|
||||
|
@ -57,7 +57,6 @@ public static class Program
|
|||
.....
|
||||
|
||||
";
|
||||
return bot;
|
||||
}
|
||||
|
||||
return bot;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ public static class Program
|
|||
}
|
||||
else if (args.Length > 0)
|
||||
{
|
||||
message = String.Join(" ", args);
|
||||
message = string.Join(" ", args);
|
||||
}
|
||||
|
||||
Console.WriteLine(GetBot(message));
|
||||
|
@ -62,5 +62,4 @@ public static class Program
|
|||
";
|
||||
return bot;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace HelloWorldSample
|
||||
namespace HelloWorldSample
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HelloWorldSample
|
||||
namespace HelloWorldSample
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static async Task Main()
|
||||
{
|
||||
await Task.Run(() => Console.WriteLine("Hello World!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class Program
|
||||
{
|
||||
public static async Task Main()
|
||||
{
|
||||
await Task.Run(() => Console.WriteLine("Hello World!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Qotd
|
||||
namespace Qotd
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Length <=0)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("You must specify a quotes file.");
|
||||
Console.ResetColor();
|
||||
return;
|
||||
}
|
||||
var quotes = File.ReadAllLines(args[0]);
|
||||
var randomQuote = quotes[new Random().Next(0, quotes.Length-1)];
|
||||
|
||||
Console.WriteLine("[QOTD]: {0}", randomQuote);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("You must specify a quotes file.");
|
||||
Console.ResetColor();
|
||||
return;
|
||||
}
|
||||
|
||||
var quotes = File.ReadAllLines(args[0]);
|
||||
var randomQuote = quotes[new Random().Next(0, quotes.Length - 1)];
|
||||
|
||||
Console.WriteLine($"[QOTD]: {randomQuote}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue