Add sample for global tools (#1288)
This commit is contained in:
parent
66e24971a0
commit
7efdad07a5
62
samples/dotnetsay/Program.cs
Normal file
62
samples/dotnetsay/Program.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string message = "dotnet-bot: Welcome to using .NET Core with a global tool!";
|
||||
|
||||
if (args.Length > 0)
|
||||
{
|
||||
message = String.Join(" ", args);
|
||||
}
|
||||
|
||||
Console.WriteLine(GetBot(message));
|
||||
}
|
||||
|
||||
public static string GetBot(string message)
|
||||
{
|
||||
string bot = $"\n {message}";
|
||||
bot += @"
|
||||
__________________
|
||||
\
|
||||
\
|
||||
....
|
||||
....'
|
||||
....
|
||||
..........
|
||||
.............'..'..
|
||||
................'..'.....
|
||||
.......'..........'..'..'....
|
||||
........'..........'..'..'.....
|
||||
.'....'..'..........'..'.......'.
|
||||
.'..................'... ......
|
||||
. ......'......... .....
|
||||
. ......
|
||||
.. . .. ......
|
||||
.... . .......
|
||||
...... ....... ............
|
||||
................ ......................
|
||||
........................'................
|
||||
......................'..'...... .......
|
||||
.........................'..'..... .......
|
||||
........ ..'.............'..'.... ..........
|
||||
..'..'... ...............'....... ..........
|
||||
...'...... ...... .......... ...... .......
|
||||
........... ....... ........ ......
|
||||
....... '...'.'. '.'.'.' ....
|
||||
....... .....'.. ..'.....
|
||||
.. .......... ..'........
|
||||
............ ..............
|
||||
............. '..............
|
||||
...........'.. .'.'............
|
||||
............... .'.'.............
|
||||
.............'.. ..'..'...........
|
||||
............... .'..............
|
||||
......... ..............
|
||||
.....
|
||||
";
|
||||
return bot;
|
||||
}
|
||||
|
||||
}
|
9
samples/dotnetsay/dotnetsay.csproj
Normal file
9
samples/dotnetsay/dotnetsay.csproj
Normal file
|
@ -0,0 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
6
samples/dotnetsay/nuget.config
Normal file
6
samples/dotnetsay/nuget.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="local-packages" value="./nupkg" />
|
||||
</packageSources>
|
||||
</configuration>
|
Loading…
Reference in a new issue