Skip to content

Commit

Permalink
patch: made HttpClient variable a class member
Browse files Browse the repository at this point in the history
  • Loading branch information
plaberge committed Oct 21, 2022
1 parent 9ce37a1 commit 96f2bc5
Show file tree
Hide file tree
Showing 24 changed files with 137 additions and 207 deletions.
3 changes: 2 additions & 1 deletion NHLStats/NHLStats/DataAccessLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ namespace NHLStats
{
public static class DataAccessLayer
{
static System.Net.Http.HttpClient client = new HttpClient();

public static JObject ExecuteAPICall(string apiUrl)
{
var client = new System.Net.Http.HttpClient();

System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
//stopwatch.Start();
// Get Current League Standings from NHL API
Expand Down
5 changes: 3 additions & 2 deletions NHLStats/NHLStats/NHLStats.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<!--<TargetFramework>netstandard2.0</TargetFramework>-->
<TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release;Packaged</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

</Project>
41 changes: 41 additions & 0 deletions NHLStats/NHLStats/bin/Debug/net6.0/NHLStats.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"NHLStats/1.0.0": {
"dependencies": {
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"NHLStats.dll": {}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
}
}
},
"libraries": {
"NHLStats/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
}
}
}
Binary file added NHLStats/NHLStats/bin/Debug/net6.0/NHLStats.dll
Binary file not shown.
Binary file added NHLStats/NHLStats/bin/Debug/net6.0/NHLStats.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
23 changes: 23 additions & 0 deletions NHLStats/NHLStats/obj/Debug/net6.0/NHLStats.AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("NHLStats")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("NHLStats")]
[assembly: System.Reflection.AssemblyTitleAttribute("NHLStats")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d0ac1ff13b8841a35ef1971f93be6d366daab87b
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = NHLStats
build_property.ProjectDir = C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\
Binary file not shown.
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2af845a4d25e0f1c4b4bfc1a0a64642e341407e8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\bin\Debug\net6.0\NHLStats.deps.json
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\bin\Debug\net6.0\NHLStats.dll
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\bin\Debug\net6.0\NHLStats.pdb
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.csproj.AssemblyReference.cache
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.AssemblyInfoInputs.cache
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.AssemblyInfo.cs
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.csproj.CoreCompileInputs.cache
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.dll
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\refint\NHLStats.dll
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\NHLStats.pdb
C:\Users\plaberge\source\repos\plaberge\nhlstats\NHLStats\NHLStats\obj\Debug\net6.0\ref\NHLStats.dll
Binary file added NHLStats/NHLStats/obj/Debug/net6.0/NHLStats.dll
Binary file not shown.
Binary file added NHLStats/NHLStats/obj/Debug/net6.0/NHLStats.pdb
Binary file not shown.
1 change: 1 addition & 0 deletions NHLStats/NHLStats/obj/Debug/net6.0/_IsIncrementalBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj\Debug\net6.0\\_IsIncrementalBuild
Binary file not shown.
Binary file not shown.
27 changes: 14 additions & 13 deletions NHLStats/NHLStats/obj/NHLStats.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {},
"https://nuget.pkg.github.com/plaberge/index.json": {},
"https://pkgs.dev.azure.com/PaulAtMSFT/_packaging/NHLStatsDAL/nuget/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
Expand All @@ -43,15 +44,9 @@
}
},
"frameworks": {
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Newtonsoft.Json": {
"target": "Package",
"version": "[13.0.1, )"
Expand All @@ -63,11 +58,17 @@
"net47",
"net471",
"net472",
"net48"
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.301\\RuntimeIdentifierGraph.json"
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion NHLStats/NHLStats/obj/NHLStats.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\plaberge\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.1</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\plaberge\.nuget\packages\" />
Expand Down
6 changes: 1 addition & 5 deletions NHLStats/NHLStats/obj/NHLStats.csproj.nuget.g.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
</ImportGroup>
</Project>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
Loading

0 comments on commit 96f2bc5

Please sign in to comment.