Upgrade BettingPredictor from .NET Framework 4.8.1 to .NET 10.0
This commit is contained in:
@@ -1,219 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.ML.FastTree.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.FastTree.props" Condition="Exists('..\packages\Microsoft.ML.FastTree.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.FastTree.props')" />
|
||||
<Import Project="..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.props" Condition="Exists('..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.props')" />
|
||||
<Import Project="..\packages\Microsoft.ML.CpuMath.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\packages\Microsoft.ML.CpuMath.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.CpuMath.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{63138155-B7F3-4246-B47B-B8CC2D7A60A4}</ProjectGuid>
|
||||
<TargetFramework>net10.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>HorseRacingPredictor</RootNamespace>
|
||||
<AssemblyName>HorseRacingPredictor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CsvHelper, Version=33.0.0.0, Culture=neutral, PublicKeyToken=8c4a6d608ce8f59c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsvHelper.33.1.0\lib\net48\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.3800.47, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.3800.47, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.3800.47, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=112.1.1.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.112.1.1-alpha.0.4\lib\net48\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.CodeDom, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.CodeDom.10.0.0-rc.1.25451.107\lib\net462\System.CodeDom.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.10.0.0-rc.1.25451.107\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.10.0.0-rc.1.25451.107\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Tensors, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Tensors.10.0.0-rc.1.25451.107\lib\net462\System.Numerics.Tensors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.10.0.0-rc.1.25451.107\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.10.0.0-rc.1.25451.107\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.10.0.0-rc.1.25451.107\lib\net462\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.5" />
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.Numerics" Version="10.0.5" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.ML" Version="5.0.0-preview.25503.2" />
|
||||
<PackageReference Include="Microsoft.ML.CpuMath" Version="5.0.0-preview.25503.2" />
|
||||
<PackageReference Include="Microsoft.ML.DataView" Version="5.0.0-preview.25503.2" />
|
||||
<PackageReference Include="Microsoft.ML.FastTree" Version="5.0.0-preview.25503.2" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3800.47" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="RestSharp" Version="112.1.1-alpha.0.4" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.5" />
|
||||
<PackageReference Include="System.Numerics.Tensors" Version="10.0.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="VirtualFootball\VirtualMatch.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CsvHelperStubs.cs" />
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Football\Database\BetType.cs" />
|
||||
<Compile Include="Football\Database\Bookmaker.cs" />
|
||||
<Compile Include="Football\Database\APIResponse.cs" />
|
||||
<Compile Include="Football\Database\TeamStats.cs" />
|
||||
<Compile Include="Football\Database\LeagueStats.cs" />
|
||||
<Compile Include="Football\Database\H2H.cs" />
|
||||
<Compile Include="Football\Database\Comparison.cs" />
|
||||
<Compile Include="Football\Database\FixtureLeague.cs" />
|
||||
<Compile Include="Football\Main.cs" />
|
||||
<Compile Include="Football\Manager\API.cs" />
|
||||
<Compile Include="Football\API\Fixture.cs" />
|
||||
<Compile Include="Football\API\League.cs" />
|
||||
<Compile Include="Football\API\Odds.cs" />
|
||||
<Compile Include="Football\API\Prediction.cs" />
|
||||
<Compile Include="Football\Database\Fixture.cs" />
|
||||
<Compile Include="Football\Database\Goals.cs" />
|
||||
<Compile Include="Football\Database\League.cs" />
|
||||
<Compile Include="Football\Database\Odds.cs" />
|
||||
<Compile Include="Football\Database\Prediction.cs" />
|
||||
<Compile Include="Football\Database\Score.cs" />
|
||||
<Compile Include="Football\Database\Team.cs" />
|
||||
<Compile Include="HorseRacing\API\RacingApiClient.cs" />
|
||||
<Compile Include="HorseRacing\Main.cs" />
|
||||
<Compile Include="Horses\Calculator.cs" />
|
||||
<Compile Include="Horses\Files\Maps\Punters.cs" />
|
||||
<Compile Include="Manager\API.cs" />
|
||||
<Compile Include="Manager\FileReader.cs" />
|
||||
<Compile Include="Manager\Database.cs" />
|
||||
<Compile Include="Football\Manager\Database.cs" />
|
||||
<Compile Include="Horses\FileReader.cs" />
|
||||
<Compile Include="Horses\Database.cs" />
|
||||
<Compile Include="Horses\Files\Punters.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<ItemGroup Label="Compile items now included by globbing that were not in the original project file">
|
||||
<Compile Remove="UI\NavButton.cs" />
|
||||
<Compile Remove="UI\ModernTheme.cs" />
|
||||
<Compile Remove="UI\ModernProgressBar.cs" />
|
||||
<Compile Remove="UI\ModernButton.cs" />
|
||||
<Compile Remove="UI\Controls\ModernTextBox.cs" />
|
||||
<Compile Remove="UI\Controls\ModernTabControl.cs" />
|
||||
<Compile Remove="UI\Controls\ModernProgressBar.cs" />
|
||||
<Compile Remove="UI\Controls\ModernPanel.cs" />
|
||||
<Compile Remove="UI\Controls\ModernLabel.cs" />
|
||||
<Compile Remove="UI\Controls\ModernDateTimePicker.cs" />
|
||||
<Compile Remove="UI\Controls\ModernDataGridView.cs" />
|
||||
<Compile Remove="UI\Controls\ModernButton.cs" />
|
||||
<Compile Remove="UI\CardPanel.cs" />
|
||||
<Compile Remove="Program.cs" />
|
||||
<Compile Remove="Main.Designer.cs" />
|
||||
<Compile Remove="Main.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<ItemGroup Label="EmbeddedResource items now included by globbing that were not in the original project file">
|
||||
<EmbeddedResource Remove="Main.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Themes\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Questo progetto fa riferimento a uno o pi� pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante � {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ML.CpuMath.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.CpuMath.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ML.FastTree.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.FastTree.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.FastTree.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.FastTree.props'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3800.47\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3800.47\build\Microsoft.Web.WebView2.targets')" />
|
||||
<Import Project="..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.targets" Condition="Exists('..\packages\Microsoft.ML.5.0.0-preview.25503.2\build\netstandard2.0\Microsoft.ML.targets')" />
|
||||
</Project>
|
||||
@@ -1,115 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Globalization;
|
||||
|
||||
// Minimal compatibility stubs for CsvHelper types used in the project.
|
||||
// These are light-weight placeholders so the project can compile when the CsvHelper NuGet
|
||||
// package is not restored. They intentionally provide only the members the project expects.
|
||||
|
||||
namespace CsvHelper.Configuration.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class NameAttribute : Attribute
|
||||
{
|
||||
public string[] Names { get; }
|
||||
public NameAttribute(params string[] names) => Names = names ?? Array.Empty<string>();
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class TypeConverterAttribute : Attribute
|
||||
{
|
||||
public Type ConverterType { get; }
|
||||
public TypeConverterAttribute(Type converterType) => ConverterType = converterType;
|
||||
}
|
||||
}
|
||||
|
||||
namespace CsvHelper.TypeConversion
|
||||
{
|
||||
public class DefaultTypeConverter
|
||||
{
|
||||
// Signature matches CsvHelper's DefaultTypeConverter override used in the project
|
||||
public virtual object ConvertFromString(string text, IReaderRow row, MemberMapData memberMapData) => (object)text;
|
||||
}
|
||||
|
||||
public class TypeConverterCache
|
||||
{
|
||||
private readonly Dictionary<Type, object> _converters = new Dictionary<Type, object>();
|
||||
public void AddConverter<T>(DefaultTypeConverter converter) => _converters[typeof(T)] = converter;
|
||||
}
|
||||
|
||||
// Minimal placeholders referenced in code
|
||||
public interface IReaderRow { }
|
||||
public class MemberMapData { }
|
||||
}
|
||||
|
||||
namespace CsvHelper.Configuration
|
||||
{
|
||||
public enum TrimOptions { None, Trim }
|
||||
|
||||
public class CsvConfiguration
|
||||
{
|
||||
public CsvConfiguration(CultureInfo culture) { Culture = culture; }
|
||||
public CultureInfo Culture { get; }
|
||||
public bool HasHeaderRecord { get; set; }
|
||||
public Func<PrepareHeaderForMatchArgs, string> PrepareHeaderForMatch { get; set; }
|
||||
public object HeaderValidated { get; set; }
|
||||
public Action<object> MissingFieldFound { get; set; }
|
||||
public Action<object> BadDataFound { get; set; }
|
||||
public TrimOptions TrimOptions { get; set; }
|
||||
public string Delimiter { get; set; }
|
||||
}
|
||||
|
||||
// Basic ClassMap and mapping helper used by the project's mapping files
|
||||
public class ClassMap<T>
|
||||
{
|
||||
public MemberMap Map(Func<T, object> func) => new MemberMap();
|
||||
}
|
||||
|
||||
public class MemberMap
|
||||
{
|
||||
public MemberMap Name(params string[] names) { return this; }
|
||||
}
|
||||
|
||||
// Minimal args used by PrepareHeaderForMatch delegate in code above
|
||||
public class PrepareHeaderForMatchArgs
|
||||
{
|
||||
public string Header { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace CsvHelper
|
||||
{
|
||||
using CsvHelper.Configuration;
|
||||
using CsvHelper.TypeConversion;
|
||||
|
||||
public class CsvReader : IDisposable
|
||||
{
|
||||
private readonly TextReader _reader;
|
||||
public CsvReader(TextReader reader, CsvConfiguration config)
|
||||
{
|
||||
_reader = reader;
|
||||
Configuration = config;
|
||||
Context = new ReaderContext();
|
||||
}
|
||||
|
||||
public CsvConfiguration Configuration { get; }
|
||||
public ReaderContext Context { get; }
|
||||
|
||||
public void Dispose() { /* nothing to dispose in stub */ }
|
||||
|
||||
public bool Read() => false;
|
||||
public void ReadHeader() { }
|
||||
public string[] HeaderRecord => Array.Empty<string>();
|
||||
public string GetField(int index) => null;
|
||||
|
||||
public IEnumerable<T> GetRecords<T>() { return Enumerable.Empty<T>(); }
|
||||
|
||||
public class ReaderContext
|
||||
{
|
||||
public TypeConverterCache TypeConverterCache { get; } = new TypeConverterCache();
|
||||
public void RegisterClassMap<TMap>() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Text;
|
||||
using RestSharp;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
@@ -11,7 +11,7 @@ namespace HorseRacingPredictor.Football.Database
|
||||
try
|
||||
{
|
||||
var id = betType["id"]?.Value<int>();
|
||||
if (id == null) return; // Salta il record se l'id è null
|
||||
if (id == null) return; // Salta il record se l'id è null
|
||||
|
||||
var query = @"
|
||||
IF EXISTS (SELECT 1 FROM BetType WHERE bet_type_id = @bet_type_id)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
@@ -11,7 +11,7 @@ namespace HorseRacingPredictor.Football.Database
|
||||
try
|
||||
{
|
||||
var id = bookmaker["id"]?.Value<int>();
|
||||
if (id == null) return; // Salta il record se l'id è null
|
||||
if (id == null) return; // Salta il record se l'id è null
|
||||
|
||||
var query = @"
|
||||
IF EXISTS (SELECT 1 FROM Bookmaker WHERE bookmaker_id = @bookmaker_id)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
@@ -143,7 +143,7 @@ namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
try
|
||||
{
|
||||
using (var connection = new System.Data.SqlClient.SqlConnection(_connectionString))
|
||||
using (var connection = new Microsoft.Data.SqlClient.SqlConnection(_connectionString))
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace HorseRacingPredictor.Football.Database
|
||||
ORDER BY
|
||||
f.date ASC";
|
||||
|
||||
using (var adapter = new System.Data.SqlClient.SqlDataAdapter(query, connection))
|
||||
using (var adapter = new Microsoft.Data.SqlClient.SqlDataAdapter(query, connection))
|
||||
{
|
||||
adapter.Fill(result);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace HorseRacingPredictor.Football.Database
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
@@ -8,7 +8,7 @@ using RestSharp;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace HorseRacingPredictor.Football
|
||||
{
|
||||
@@ -276,7 +276,7 @@ namespace HorseRacingPredictor.Football
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera le quote per la data specificata (potenzialmente più pagine) utilizzando API.Odds
|
||||
/// Recupera le quote per la data specificata (potenzialmente più pagine) utilizzando API.Odds
|
||||
/// </summary>
|
||||
private List<RestResponse> GetOdds(DateTime date)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ namespace HorseRacingPredictor.Football
|
||||
}
|
||||
}
|
||||
|
||||
// FASE 5: Inserisci relazioni tra entità e dati dipendenti
|
||||
// FASE 5: Inserisci relazioni tra entità e dati dipendenti
|
||||
foreach (var responseItem in asArray(jsonObject["response"]))
|
||||
{
|
||||
int? fixtureId = null;
|
||||
@@ -572,8 +572,8 @@ namespace HorseRacingPredictor.Football
|
||||
{
|
||||
try
|
||||
{
|
||||
// In questo metodo non elaboriamo più direttamente le risposte
|
||||
// Le risposte sono già state salvate nel database dalla classe API
|
||||
// In questo metodo non elaboriamo più direttamente le risposte
|
||||
// Le risposte sono già state salvate nel database dalla classe API
|
||||
// e verranno elaborate dal metodo ProcessUnprocessedApiResponses
|
||||
|
||||
// Processa le risposte non elaborate
|
||||
@@ -608,7 +608,7 @@ namespace HorseRacingPredictor.Football
|
||||
dataTable.Columns.Add("Quota Trasferta", typeof(string));
|
||||
dataTable.Columns.Add("Over 2.5", typeof(string));
|
||||
dataTable.Columns.Add("Under 2.5", typeof(string));
|
||||
dataTable.Columns.Add("BTTS Sì", typeof(string));
|
||||
dataTable.Columns.Add("BTTS Sì", typeof(string));
|
||||
dataTable.Columns.Add("BTTS No", typeof(string));
|
||||
dataTable.Columns.Add("Doppia Casa/X", typeof(string));
|
||||
dataTable.Columns.Add("Doppia Casa/Trasf", typeof(string));
|
||||
@@ -646,7 +646,7 @@ namespace HorseRacingPredictor.Football
|
||||
{
|
||||
try
|
||||
{
|
||||
// Verifica che le proprietà essenziali esistano
|
||||
// Verifica che le proprietà essenziali esistano
|
||||
if (!item.TryGetProperty("fixture", out var fixtureEl) ||
|
||||
!item.TryGetProperty("league", out var leagueEl) ||
|
||||
!item.TryGetProperty("teams", out var teamsEl))
|
||||
@@ -700,7 +700,7 @@ namespace HorseRacingPredictor.Football
|
||||
row["Quota Trasferta"] = DBNull.Value;
|
||||
row["Over 2.5"] = DBNull.Value;
|
||||
row["Under 2.5"] = DBNull.Value;
|
||||
row["BTTS Sì"] = DBNull.Value;
|
||||
row["BTTS Sì"] = DBNull.Value;
|
||||
row["BTTS No"] = DBNull.Value;
|
||||
row["Doppia Casa/X"] = DBNull.Value;
|
||||
row["Doppia Casa/Trasf"] = DBNull.Value;
|
||||
@@ -731,7 +731,7 @@ namespace HorseRacingPredictor.Football
|
||||
// Crea una copia del DataTable delle partite
|
||||
var combinedTable = fixturesTable.Copy();
|
||||
|
||||
// Se non ci sono risposte di quote o la tabella delle partite è vuota, ritorna la tabella originale
|
||||
// Se non ci sono risposte di quote o la tabella delle partite è vuota, ritorna la tabella originale
|
||||
if (oddsResponses == null || oddsResponses.Count == 0 || combinedTable.Rows.Count == 0)
|
||||
{
|
||||
return combinedTable;
|
||||
@@ -868,7 +868,7 @@ namespace HorseRacingPredictor.Football
|
||||
var table = new DataTable();
|
||||
table.Columns.Add("Errore", typeof(string));
|
||||
var row = table.NewRow();
|
||||
row["Errore"] = "Si è verificato un errore durante il recupero dei dati.";
|
||||
row["Errore"] = "Si è verificato un errore durante il recupero dei dati.";
|
||||
table.Rows.Add(row);
|
||||
return table;
|
||||
}
|
||||
@@ -972,7 +972,7 @@ namespace HorseRacingPredictor.Football
|
||||
{
|
||||
string val = GetOddValueString(v, "value");
|
||||
string odd = GetOddValueString(v, "odd");
|
||||
if (val == "Yes") row["BTTS Sì"] = odd;
|
||||
if (val == "Yes") row["BTTS Sì"] = odd;
|
||||
else if (val == "No") row["BTTS No"] = odd;
|
||||
}
|
||||
break;
|
||||
@@ -1079,7 +1079,7 @@ namespace HorseRacingPredictor.Football
|
||||
var result = CreateEmptyFixturesDataTable();
|
||||
|
||||
// Step 2: Delegare alla classe repository appropriata il recupero dei dati
|
||||
// Utilizziamo principalmente il repository Fixture che può coordinarsi con gli altri repository
|
||||
// Utilizziamo principalmente il repository Fixture che può coordinarsi con gli altri repository
|
||||
return _fixtureRepository.GetProcessedFixtures();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Text.Json.Nodes;
|
||||
using HorseRacingPredictor.Football.Database;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace HorseRacingPredictor.Football.Manager
|
||||
{
|
||||
internal class Database : HorseRacingPredictor.Manager.Database
|
||||
{
|
||||
// Implementazione della proprietà astratta _connectionString per il database calcio
|
||||
// Implementazione della proprietà astratta _connectionString per il database calcio
|
||||
protected override string _connectionString => "Server=DESKTOP-9O9JHFS;Database=TestBS_Football;User Id=sa;Password=Asti2019;";
|
||||
|
||||
// Usato il modificatore "new" per evitare il warning CS0108
|
||||
@@ -28,11 +28,11 @@ namespace HorseRacingPredictor.Football.Manager
|
||||
base.ExecuteTransactionalQuery(operation, action);
|
||||
}
|
||||
|
||||
// Questo metodo ora è vuoto e sarà implementato nella Main
|
||||
// Questo metodo ora è vuoto e sarà implementato nella Main
|
||||
public void ProcessAndInsertData(string jsonResponse)
|
||||
{
|
||||
// Il codice è stato spostato in Football.Main
|
||||
LogError("l'elaborazione dei dati calcistici", new NotImplementedException("Questo metodo è stato spostato in Football.Main"));
|
||||
// Il codice è stato spostato in Football.Main
|
||||
LogError("l'elaborazione dei dati calcistici", new NotImplementedException("Questo metodo è stato spostato in Football.Main"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using BettingPredictor;
|
||||
@@ -10,7 +10,7 @@ namespace HorseRacingPredictor.Horses
|
||||
{
|
||||
internal class Database : HorseRacingPredictor.Manager.Database
|
||||
{
|
||||
// Implementazione della proprietà astratta _connectionString per il database cavalli
|
||||
// Implementazione della proprietà astratta _connectionString per il database cavalli
|
||||
protected override string _connectionString => "Server=DESKTOP-9O9JHFS;Database=TestBS_Horses;User Id=sa;Password=Asti2019;";
|
||||
|
||||
private readonly FileReader fileReaderHorses;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace HorseRacingPredictor.Manager
|
||||
{
|
||||
@@ -69,7 +69,7 @@ namespace HorseRacingPredictor.Manager
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per verificare se la connessione al database è valida
|
||||
/// Metodo per verificare se la connessione al database è valida
|
||||
/// </summary>
|
||||
public bool TestConnection()
|
||||
{
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CsvHelper" version="33.1.0" targetFramework="net481" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net481" />
|
||||
<package id="Microsoft.Bcl.Numerics" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net481" />
|
||||
<package id="Microsoft.ML" version="5.0.0-preview.25503.2" targetFramework="net481" />
|
||||
<package id="Microsoft.ML.CpuMath" version="5.0.0-preview.25503.2" targetFramework="net481" />
|
||||
<package id="Microsoft.ML.DataView" version="5.0.0-preview.25503.2" targetFramework="net481" />
|
||||
<package id="Microsoft.ML.FastTree" version="5.0.0-preview.25503.2" targetFramework="net481" />
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.3800.47" targetFramework="net481" />
|
||||
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net481" />
|
||||
<package id="RestSharp" version="112.1.1-alpha.0.4" targetFramework="net481" />
|
||||
<package id="System.Buffers" version="4.6.1" targetFramework="net481" />
|
||||
<package id="System.CodeDom" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Collections.Immutable" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.IO.Pipelines" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Memory" version="4.6.3" targetFramework="net481" />
|
||||
<package id="System.Numerics.Tensors" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net481" />
|
||||
<package id="System.Reflection.Emit.Lightweight" version="4.7.0" targetFramework="net481" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net481" />
|
||||
<package id="System.Text.Encodings.Web" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Text.Json" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Threading.Channels" version="10.0.0-rc.1.25451.107" targetFramework="net481" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net481" />
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net481" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user