Mark types explicitly
This commit is contained in:
parent
5f18fe037c
commit
e3f093b53a
|
|
@ -24,8 +24,8 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var results = await _documentation.GetBgpCommunities();
|
||||
var filtered = results.Results.Where(b => b.Name.StartsWith(_configuration["ASN"]))
|
||||
RouteTargets results = await _documentation.GetBgpCommunities();
|
||||
List<Result> filtered = results.Results.Where(b => b.Name.StartsWith(_configuration["ASN"]))
|
||||
.ToList();
|
||||
|
||||
return View(filtered);
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ namespace AS1024.CommunityDocumentationPage.DIScopes
|
|||
using HttpClient client = new HttpClient();
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Token", configuration["APIKey"]);
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
var result = await client.GetAsync(BuildNetBoxURI());
|
||||
var stringResult = await result.Content.ReadAsStringAsync();
|
||||
HttpResponseMessage result = await client.GetAsync(BuildNetBoxURI());
|
||||
string stringResult = await result.Content.ReadAsStringAsync();
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
return JsonConvert.DeserializeObject<RouteTargets>(stringResult);
|
||||
#pragma warning restore CS8603 // Possible null reference return.
|
||||
|
|
@ -31,7 +31,7 @@ namespace AS1024.CommunityDocumentationPage.DIScopes
|
|||
|
||||
protected Uri BuildNetBoxURI()
|
||||
{
|
||||
var endUrl = new UriBuilder
|
||||
UriBuilder endUrl = new UriBuilder
|
||||
{
|
||||
Path = "/api/ipam/route-targets/",
|
||||
Host = configuration["NetBoxHost"],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
/// <returns>true if it's a valid bgp community, false if it isn't</returns>
|
||||
public static bool IsValidBgpCommunity(this string Community)
|
||||
{
|
||||
var splitStrings =
|
||||
string[] splitStrings =
|
||||
Community.Split(":", StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
"profiles": {
|
||||
"AS1024.CommunityDocumentationPage": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5224",
|
||||
"environmentVariables": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue