Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/TestApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
using LinkAce.NET;
using System.Net;
using LinkAce.NET;
using Microsoft.Extensions.Configuration;
Console.WriteLine("Hello, World!");

var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", false, true)
.Build();

var handler = new HttpClientHandler()
{
Proxy = new WebProxy("localhost:8080", false)
};
var httpClient = new HttpClient(handler);

var linkAceConfig = configuration.GetSection("LinkAce");
var linkAceClient = new LinkAceClient(linkAceConfig["Url"] ?? throw new InvalidOperationException(),
linkAceConfig["ApiToken"] ?? throw new InvalidOperationException());
linkAceConfig["ApiToken"] ?? throw new InvalidOperationException(),
httpClient);
var results = linkAceClient.SearchLinksByUrl("jrgnsn.net").Result;

var _ = () => { };