diff --git a/csharp/GithubTest/.vscode/settings.json b/csharp/GithubTest/.vscode/settings.json new file mode 100644 index 0000000..b9261fc --- /dev/null +++ b/csharp/GithubTest/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "GithubTest.sln" +} \ No newline at end of file diff --git a/csharp/GithubTest/GithubTest.csproj b/csharp/GithubTest/GithubTest.csproj new file mode 100644 index 0000000..b14f8be --- /dev/null +++ b/csharp/GithubTest/GithubTest.csproj @@ -0,0 +1,15 @@ + + + + Exe + net10.0 + enable + enable + + + + + + + + diff --git a/csharp/GithubTest/Program.cs b/csharp/GithubTest/Program.cs new file mode 100644 index 0000000..8a76f05 --- /dev/null +++ b/csharp/GithubTest/Program.cs @@ -0,0 +1,20 @@ +using System.Collections; +using Octokit; + +namespace Iminetsoft.Dev.GithubTest +{ + public static class Program + { + public static async Task Main(string[] Args) + { + var args = Iminetcore.ConsoleParser.ArgParser.ParseDynamic(Args); + + var github = new GitHubClient(new ProductHeaderValue("GithubTest")); + github.Credentials = new Credentials(Environment.GetEnvironmentVariable("GITHUB_TOKEN")); + + var repos = await github.Repository.GetAllForCurrent(); + + repos.ToList().ForEach(r => Console.WriteLine($"{r.Name}")); + } + } +} \ No newline at end of file diff --git a/csharp/ImgBBTest/Program.cs b/csharp/ImgBBTest/Program.cs index db11f3d..9062cec 100644 --- a/csharp/ImgBBTest/Program.cs +++ b/csharp/ImgBBTest/Program.cs @@ -1,3 +1,5 @@ +using System.Collections; + namespace Iminetsoft.Dev.ImgBBTest { public static class Program @@ -8,6 +10,10 @@ namespace Iminetsoft.Dev.ImgBBTest Console.WriteLine("IMGBB Test Application"); + Environment.GetEnvironmentVariables().Cast().OrderBy(x => x.Key).ToList().ForEach(x => Console.WriteLine($"\t{x.Key} :: {x.Value}")); + + return; + var imgbb_token = Environment.GetEnvironmentVariable("IMGBB_TOKEN") ?? args.token ?? args.t; var imgbb = new ImgBBApi(imgbb_token); var uploaded = new List(); diff --git a/devtools.sln b/devtools.sln index de33757..30b1838 100644 --- a/devtools.sln +++ b/devtools.sln @@ -1,3 +1,4 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.2.0 @@ -9,13 +10,25 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x64.ActiveCfg = Debug|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x64.Build.0 = Debug|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x86.Build.0 = Debug|Any CPU {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.Build.0 = Release|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x64.ActiveCfg = Release|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x64.Build.0 = Release|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x86.ActiveCfg = Release|Any CPU + {693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE