diff --git a/.github/workflows/master-build-and-deploy-to-azure.yml b/.github/workflows/master-build-and-deploy-to-azure.yml deleted file mode 100644 index 17bc487..0000000 --- a/.github/workflows/master-build-and-deploy-to-azure.yml +++ /dev/null @@ -1,126 +0,0 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action -# More GitHub Actions for Azure: https://github.com/Azure/actions - -name: Build and deploy to Azure - -on: - push: - branches: - - master - workflow_dispatch: - -env: - UPCOMING_EVENTS_FUNCTION_PACKAGE_PATH: 'OddsCollector.Functions.UpcomingEvents' - EVENT_RESULTS_FUNCTION_PACKAGE_PATH: 'OddsCollector.Functions.EventResults' - PREDICTIONS_FUNCTION_PACKAGE_PATH: 'OddsCollector.Functions.Predictions' - NOTIFICATION_FUNCTION_PACKAGE_PATH: 'OddsCollector.Functions.Notification' - DOTNET_VERSION: '8.0.x' - -jobs: - build-and-deploy-upcoming-events: - runs-on: windows-latest - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: 'Resolve Project Dependencies Using Dotnet' - shell: pwsh - run: | - pushd './${{ env.UPCOMING_EVENTS_FUNCTION_PACKAGE_PATH }}' - dotnet build --configuration Release --output ./output - popd - - - name: 'Run Azure Functions Action' - uses: Azure/functions-action@v1 - id: fa - with: - app-name: 'oddscollector-upcoming-events' - slot-name: 'Production' - package: '${{ env.UPCOMING_EVENTS_FUNCTION_PACKAGE_PATH }}/output' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_83DC6CCA847446E686FEDD7CA3F82BC4 }} - - build-and-deploy-event-results: - runs-on: windows-latest - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: 'Resolve Project Dependencies Using Dotnet' - shell: pwsh - run: | - pushd './${{ env.EVENT_RESULTS_FUNCTION_PACKAGE_PATH }}' - dotnet build --configuration Release --output ./output - popd - - - name: 'Run Azure Functions Action' - uses: Azure/functions-action@v1 - id: fa - with: - app-name: 'oddscollector-event-results' - slot-name: 'Production' - package: '${{ env.EVENT_RESULTS_FUNCTION_PACKAGE_PATH }}/output' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_ADAF7561B02647A59DBEB1790452FBA3 }} - - build-and-deploy-predictions: - runs-on: windows-latest - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: 'Resolve Project Dependencies Using Dotnet' - shell: pwsh - run: | - pushd './${{ env.PREDICTIONS_FUNCTION_PACKAGE_PATH }}' - dotnet build --configuration Release --output ./output - popd - - - name: 'Run Azure Functions Action' - uses: Azure/functions-action@v1 - id: fa - with: - app-name: 'oddscollector-predictions' - slot-name: 'Production' - package: '${{ env.PREDICTIONS_FUNCTION_PACKAGE_PATH }}/output' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_6D01928543324191A154A059A20C08F6 }} - - build-and-deploy-notification: - runs-on: windows-latest - steps: - - name: 'Checkout GitHub Action' - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: 'Resolve Project Dependencies Using Dotnet' - shell: pwsh - run: | - pushd './${{ env.NOTIFICATION_FUNCTION_PACKAGE_PATH }}' - dotnet build --configuration Release --output ./output - popd - - - name: 'Run Azure Functions Action' - uses: Azure/functions-action@v1 - id: fa - with: - app-name: 'oddscollector-notification' - slot-name: 'Production' - package: '${{ env.NOTIFICATION_FUNCTION_PACKAGE_PATH }}/output' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_3C41A87CE3DC4B03A71A681D0D5F43BA }} \ No newline at end of file diff --git a/OddsCollector.Common.Tests/GlobalUsings.cs b/OddsCollector.Common.Tests/GlobalUsings.cs deleted file mode 100644 index 9a28bd8..0000000 --- a/OddsCollector.Common.Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; diff --git a/OddsCollector.Common/OddsCollector.Common.csproj b/OddsCollector.Common/OddsCollector.Common.csproj deleted file mode 100644 index a5507f8..0000000 --- a/OddsCollector.Common/OddsCollector.Common.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net8.0 - enable - enable - True - All - - - - - - - - - - - - - Never - true - PreserveNewest - - - - diff --git a/OddsCollector.Functions.EventResults.Tests/GlobalUsings.cs b/OddsCollector.Functions.EventResults.Tests/GlobalUsings.cs deleted file mode 100644 index 9a28bd8..0000000 --- a/OddsCollector.Functions.EventResults.Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; diff --git a/OddsCollector.Functions.EventResults.Tests/OddsCollector.Functions.EventResults.Tests.csproj b/OddsCollector.Functions.EventResults.Tests/OddsCollector.Functions.EventResults.Tests.csproj deleted file mode 100644 index 0f27b81..0000000 --- a/OddsCollector.Functions.EventResults.Tests/OddsCollector.Functions.EventResults.Tests.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/OddsCollector.Functions.EventResults/OddsCollector.Functions.EventResults.csproj b/OddsCollector.Functions.EventResults/OddsCollector.Functions.EventResults.csproj deleted file mode 100644 index 5d34532..0000000 --- a/OddsCollector.Functions.EventResults/OddsCollector.Functions.EventResults.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - net8.0 - v4 - Exe - enable - enable - 7f87a0de-2f59-4ceb-a93a-175067f61fef - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - Never - - - - - - \ No newline at end of file diff --git a/OddsCollector.Functions.EventResults/Program.cs b/OddsCollector.Functions.EventResults/Program.cs deleted file mode 100644 index d301db4..0000000 --- a/OddsCollector.Functions.EventResults/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Azure.Functions.Worker; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using OddsCollector.Common.OddsApi.Configuration; - -var host = new HostBuilder() - .ConfigureFunctionsWorkerDefaults() - .ConfigureServices(services => - { - services.AddOddsApiClientWithDependencies(); - services.AddApplicationInsightsTelemetryWorkerService(); - services.ConfigureFunctionsApplicationInsights(); - }) - .Build(); - -host.Run(); diff --git a/OddsCollector.Functions.EventResults/Properties/launchSettings.json b/OddsCollector.Functions.EventResults/Properties/launchSettings.json deleted file mode 100644 index ddc8c70..0000000 --- a/OddsCollector.Functions.EventResults/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "OddsCollector.Functions.EventResults": { - "commandName": "Project", - "commandLineArgs": "--port 7089", - "launchBrowser": false - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.EventResults/host.json b/OddsCollector.Functions.EventResults/host.json deleted file mode 100644 index 5df170b..0000000 --- a/OddsCollector.Functions.EventResults/host.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "2.0", - "logging": { - "applicationInsights": { - "samplingSettings": { - "isEnabled": true, - "excludedTypes": "Request" - }, - "enableLiveMetricsFilters": true - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Notification.Tests/GlobalUsings.cs b/OddsCollector.Functions.Notification.Tests/GlobalUsings.cs deleted file mode 100644 index 9a28bd8..0000000 --- a/OddsCollector.Functions.Notification.Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; diff --git a/OddsCollector.Functions.Notification.Tests/OddsCollector.Functions.Notification.Tests.csproj b/OddsCollector.Functions.Notification.Tests/OddsCollector.Functions.Notification.Tests.csproj deleted file mode 100644 index 21d8331..0000000 --- a/OddsCollector.Functions.Notification.Tests/OddsCollector.Functions.Notification.Tests.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/OddsCollector.Functions.Notification/.gitignore b/OddsCollector.Functions.Notification/.gitignore deleted file mode 100644 index ff5b00c..0000000 --- a/OddsCollector.Functions.Notification/.gitignore +++ /dev/null @@ -1,264 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# Azure Functions localsettings file -local.settings.json - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -project.fragment.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -#*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc \ No newline at end of file diff --git a/OddsCollector.Functions.Notification/Properties/launchSettings.json b/OddsCollector.Functions.Notification/Properties/launchSettings.json deleted file mode 100644 index 746b042..0000000 --- a/OddsCollector.Functions.Notification/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "OddsCollector.Functions.Notification": { - "commandName": "Project", - "commandLineArgs": "--port 7137", - "launchBrowser": false - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Notification/Properties/serviceDependencies.json b/OddsCollector.Functions.Notification/Properties/serviceDependencies.json deleted file mode 100644 index df4dcc9..0000000 --- a/OddsCollector.Functions.Notification/Properties/serviceDependencies.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights" - }, - "storage1": { - "type": "storage", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Notification/Properties/serviceDependencies.local.json b/OddsCollector.Functions.Notification/Properties/serviceDependencies.local.json deleted file mode 100644 index b804a28..0000000 --- a/OddsCollector.Functions.Notification/Properties/serviceDependencies.local.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights.sdk" - }, - "storage1": { - "type": "storage.emulator", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Notification/host.json b/OddsCollector.Functions.Notification/host.json deleted file mode 100644 index 5df170b..0000000 --- a/OddsCollector.Functions.Notification/host.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "2.0", - "logging": { - "applicationInsights": { - "samplingSettings": { - "isEnabled": true, - "excludedTypes": "Request" - }, - "enableLiveMetricsFilters": true - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Predictions.Tests/GlobalUsings.cs b/OddsCollector.Functions.Predictions.Tests/GlobalUsings.cs deleted file mode 100644 index 9a28bd8..0000000 --- a/OddsCollector.Functions.Predictions.Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; diff --git a/OddsCollector.Functions.Predictions.Tests/OddsCollector.Functions.Predictions.Tests.csproj b/OddsCollector.Functions.Predictions.Tests/OddsCollector.Functions.Predictions.Tests.csproj deleted file mode 100644 index eb83d58..0000000 --- a/OddsCollector.Functions.Predictions.Tests/OddsCollector.Functions.Predictions.Tests.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/OddsCollector.Functions.Predictions/.gitignore b/OddsCollector.Functions.Predictions/.gitignore deleted file mode 100644 index ff5b00c..0000000 --- a/OddsCollector.Functions.Predictions/.gitignore +++ /dev/null @@ -1,264 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# Azure Functions localsettings file -local.settings.json - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -project.fragment.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -#*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc \ No newline at end of file diff --git a/OddsCollector.Functions.Predictions/OddsCollector.Functions.Predictions.csproj b/OddsCollector.Functions.Predictions/OddsCollector.Functions.Predictions.csproj deleted file mode 100644 index 4da14d1..0000000 --- a/OddsCollector.Functions.Predictions/OddsCollector.Functions.Predictions.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - net8.0 - v4 - Exe - enable - enable - cfaec948-c93a-429d-8cb9-3e483cca8073 - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - Never - - - - - - \ No newline at end of file diff --git a/OddsCollector.Functions.Predictions/Program.cs b/OddsCollector.Functions.Predictions/Program.cs deleted file mode 100644 index 67e1f41..0000000 --- a/OddsCollector.Functions.Predictions/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Azure.Functions.Worker; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using OddsCollector.Functions.Predictions.Strategies; - -var host = new HostBuilder() - .ConfigureFunctionsWorkerDefaults() - .ConfigureServices(services => - { - services.AddSingleton(); - services.AddApplicationInsightsTelemetryWorkerService(); - services.ConfigureFunctionsApplicationInsights(); - }) - .Build(); - -host.Run(); diff --git a/OddsCollector.Functions.Predictions/Properties/serviceDependencies.json b/OddsCollector.Functions.Predictions/Properties/serviceDependencies.json deleted file mode 100644 index df4dcc9..0000000 --- a/OddsCollector.Functions.Predictions/Properties/serviceDependencies.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights" - }, - "storage1": { - "type": "storage", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Predictions/Properties/serviceDependencies.local.json b/OddsCollector.Functions.Predictions/Properties/serviceDependencies.local.json deleted file mode 100644 index b804a28..0000000 --- a/OddsCollector.Functions.Predictions/Properties/serviceDependencies.local.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights.sdk" - }, - "storage1": { - "type": "storage.emulator", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Predictions/host.json b/OddsCollector.Functions.Predictions/host.json deleted file mode 100644 index 5df170b..0000000 --- a/OddsCollector.Functions.Predictions/host.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "2.0", - "logging": { - "applicationInsights": { - "samplingSettings": { - "isEnabled": true, - "excludedTypes": "Request" - }, - "enableLiveMetricsFilters": true - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderOptionsTests.cs b/OddsCollector.Functions.Tests/CommunicationServices/EmailSenderOptionsTests.cs similarity index 92% rename from OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderOptionsTests.cs rename to OddsCollector.Functions.Tests/CommunicationServices/EmailSenderOptionsTests.cs index f8de2c4..2221e06 100644 --- a/OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderOptionsTests.cs +++ b/OddsCollector.Functions.Tests/CommunicationServices/EmailSenderOptionsTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Functions.Notification.CommunicationServices.Configuration; +using OddsCollector.Functions.CommunicationServices.Configuration; -namespace OddsCollector.Functions.Notification.Tests.CommunicationServices; +namespace OddsCollector.Functions.Tests.CommunicationServices; [Parallelizable(ParallelScope.All)] internal class EmailSenderOptionsTests diff --git a/OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderTests.cs b/OddsCollector.Functions.Tests/CommunicationServices/EmailSenderTests.cs similarity index 91% rename from OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderTests.cs rename to OddsCollector.Functions.Tests/CommunicationServices/EmailSenderTests.cs index 72f8fa5..15caeda 100644 --- a/OddsCollector.Functions.Notification.Tests/CommunicationServices/EmailSenderTests.cs +++ b/OddsCollector.Functions.Tests/CommunicationServices/EmailSenderTests.cs @@ -1,14 +1,12 @@ using System.Text.Json; using Azure; using Azure.Communication.Email; -using FluentAssertions; using Microsoft.Extensions.Options; -using NSubstitute; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Notification.CommunicationServices; -using OddsCollector.Functions.Notification.CommunicationServices.Configuration; +using OddsCollector.Functions.CommunicationServices; +using OddsCollector.Functions.CommunicationServices.Configuration; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.Tests.CommunicationServices; +namespace OddsCollector.Functions.Tests.CommunicationServices; [Parallelizable(ParallelScope.All)] internal class EmailSenderTests diff --git a/OddsCollector.Functions.Notification.Tests/CosmosDb/ContainerFactoryTests.cs b/OddsCollector.Functions.Tests/CosmosDb/ContainerFactoryTests.cs similarity index 92% rename from OddsCollector.Functions.Notification.Tests/CosmosDb/ContainerFactoryTests.cs rename to OddsCollector.Functions.Tests/CosmosDb/ContainerFactoryTests.cs index e485a41..e52b8e4 100644 --- a/OddsCollector.Functions.Notification.Tests/CosmosDb/ContainerFactoryTests.cs +++ b/OddsCollector.Functions.Tests/CosmosDb/ContainerFactoryTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Functions.Notification.CosmosDb; +using OddsCollector.Functions.CosmosDb; -namespace OddsCollector.Functions.Notification.Tests.CosmosDb; +namespace OddsCollector.Functions.Tests.CosmosDb; [Parallelizable(ParallelScope.All)] internal class ContainerFactoryTests diff --git a/OddsCollector.Functions.Notification.Tests/CosmosDb/CosmosDbClientTests.cs b/OddsCollector.Functions.Tests/CosmosDb/CosmosDbClientTests.cs similarity index 77% rename from OddsCollector.Functions.Notification.Tests/CosmosDb/CosmosDbClientTests.cs rename to OddsCollector.Functions.Tests/CosmosDb/CosmosDbClientTests.cs index 9fb6b82..785f8b8 100644 --- a/OddsCollector.Functions.Notification.Tests/CosmosDb/CosmosDbClientTests.cs +++ b/OddsCollector.Functions.Tests/CosmosDb/CosmosDbClientTests.cs @@ -1,9 +1,7 @@ -using FluentAssertions; -using Microsoft.Azure.Cosmos; -using NSubstitute; -using OddsCollector.Functions.Notification.CosmosDb; +using Microsoft.Azure.Cosmos; +using OddsCollector.Functions.CosmosDb; -namespace OddsCollector.Functions.Notification.Tests.CosmosDb; +namespace OddsCollector.Functions.Tests.CosmosDb; [Parallelizable(ParallelScope.All)] internal class CosmosDbClientTests diff --git a/OddsCollector.Functions.EventResults.Tests/EventResultsFunctionTests.cs b/OddsCollector.Functions.Tests/Functions/EventResultsFunctionTests.cs similarity index 92% rename from OddsCollector.Functions.EventResults.Tests/EventResultsFunctionTests.cs rename to OddsCollector.Functions.Tests/Functions/EventResultsFunctionTests.cs index c67cc9f..65acf06 100644 --- a/OddsCollector.Functions.EventResults.Tests/EventResultsFunctionTests.cs +++ b/OddsCollector.Functions.Tests/Functions/EventResultsFunctionTests.cs @@ -1,11 +1,10 @@ -using FluentAssertions; -using Microsoft.Extensions.Logging; -using NSubstitute; +using Microsoft.Extensions.Logging; using NSubstitute.ExceptionExtensions; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi; +using OddsCollector.Functions.Functions; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi; -namespace OddsCollector.Functions.EventResults.Tests; +namespace OddsCollector.Functions.Tests.Functions; [Parallelizable(ParallelScope.All)] internal sealed class EventResultsFunctionTests diff --git a/OddsCollector.Functions.Notification.Tests/NotificationFunctionTests.cs b/OddsCollector.Functions.Tests/Functions/NotificationFunctionTests.cs similarity index 92% rename from OddsCollector.Functions.Notification.Tests/NotificationFunctionTests.cs rename to OddsCollector.Functions.Tests/Functions/NotificationFunctionTests.cs index 968e728..fa5d77c 100644 --- a/OddsCollector.Functions.Notification.Tests/NotificationFunctionTests.cs +++ b/OddsCollector.Functions.Tests/Functions/NotificationFunctionTests.cs @@ -1,12 +1,11 @@ -using FluentAssertions; -using Microsoft.Extensions.Logging; -using NSubstitute; +using Microsoft.Extensions.Logging; using NSubstitute.ExceptionExtensions; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Notification.CommunicationServices; -using OddsCollector.Functions.Notification.CosmosDb; +using OddsCollector.Functions.CommunicationServices; +using OddsCollector.Functions.CosmosDb; +using OddsCollector.Functions.Functions; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.Tests; +namespace OddsCollector.Functions.Tests.Functions; [Parallelizable(ParallelScope.All)] internal class NotificationFunctionTests diff --git a/OddsCollector.Functions.Predictions.Tests/PredictionFunctionTests.cs b/OddsCollector.Functions.Tests/Functions/PredictionFunctionTests.cs similarity index 96% rename from OddsCollector.Functions.Predictions.Tests/PredictionFunctionTests.cs rename to OddsCollector.Functions.Tests/Functions/PredictionFunctionTests.cs index 4464c2f..66baef4 100644 --- a/OddsCollector.Functions.Predictions.Tests/PredictionFunctionTests.cs +++ b/OddsCollector.Functions.Tests/Functions/PredictionFunctionTests.cs @@ -1,13 +1,13 @@ using Azure.Messaging.ServiceBus; -using FluentAssertions; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -using NSubstitute; using NSubstitute.ReceivedExtensions; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Predictions.Strategies; +using OddsCollector.Functions.Functions; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.Strategies; +using OddsCollector.Functions.Tests.ServiceBus; -namespace OddsCollector.Functions.Predictions.Tests; +namespace OddsCollector.Functions.Tests.Functions; [Parallelizable(ParallelScope.All)] internal class PredictionFunctionTests diff --git a/OddsCollector.Functions.UpcomingEvents.Tests/UpcomingEventsFunctionTest.cs b/OddsCollector.Functions.Tests/Functions/UpcomingEventsFunctionTest.cs similarity index 92% rename from OddsCollector.Functions.UpcomingEvents.Tests/UpcomingEventsFunctionTest.cs rename to OddsCollector.Functions.Tests/Functions/UpcomingEventsFunctionTest.cs index a982d46..070de1b 100644 --- a/OddsCollector.Functions.UpcomingEvents.Tests/UpcomingEventsFunctionTest.cs +++ b/OddsCollector.Functions.Tests/Functions/UpcomingEventsFunctionTest.cs @@ -1,11 +1,10 @@ -using FluentAssertions; -using Microsoft.Extensions.Logging; -using NSubstitute; +using Microsoft.Extensions.Logging; using NSubstitute.ExceptionExtensions; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi; +using OddsCollector.Functions.Functions; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi; -namespace OddsCollector.Functions.UpcomingEvents.Tests; +namespace OddsCollector.Functions.Tests.Functions; [Parallelizable(ParallelScope.All)] internal class UpcomingEventsFunctionTest diff --git a/OddsCollector.Functions.Tests/GlobalUsings.cs b/OddsCollector.Functions.Tests/GlobalUsings.cs new file mode 100644 index 0000000..26adefe --- /dev/null +++ b/OddsCollector.Functions.Tests/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using FluentAssertions; +global using NSubstitute; +global using NUnit.Framework; diff --git a/OddsCollector.Common.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs b/OddsCollector.Functions.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs similarity index 95% rename from OddsCollector.Common.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs index 4d26649..afbd1d4 100644 --- a/OddsCollector.Common.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Configuration/OddsApiOptionsTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Common.OddsApi.Configuration; +using OddsCollector.Functions.OddsApi.Configuration; -namespace OddsCollector.Common.Tests.OddsApi.Configuration; +namespace OddsCollector.Functions.Tests.OddsApi.Configuration; [Parallelizable(ParallelScope.All)] internal sealed class OddsApiOptionsTests diff --git a/OddsCollector.Common.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs b/OddsCollector.Functions.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs similarity index 83% rename from OddsCollector.Common.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs index a372562..e9d881c 100644 --- a/OddsCollector.Common.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Configuration/ServiceCollectionExtensionsTests.cs @@ -1,11 +1,10 @@ -using FluentAssertions; -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using OddsCollector.Common.OddsApi; -using OddsCollector.Common.OddsApi.Configuration; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.OddsApi; +using OddsCollector.Functions.OddsApi.Configuration; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.Tests.OddsApi.Configuration; +namespace OddsCollector.Functions.Tests.OddsApi.Configuration; internal class ServiceCollectionExtensionsTests { diff --git a/OddsCollector.Common.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs b/OddsCollector.Functions.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs similarity index 99% rename from OddsCollector.Common.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs index b577514..335e3b1 100644 --- a/OddsCollector.Common.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Converter/OddsApiObjectConverterTests.cs @@ -1,9 +1,8 @@ -using FluentAssertions; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi.Converter; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi.Converter; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.Tests.OddsApi.Converter; +namespace OddsCollector.Functions.Tests.OddsApi.Converter; [Parallelizable(ParallelScope.All)] internal sealed class OddsApiObjectConverterTests diff --git a/OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous2Builder.cs b/OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous2Builder.cs similarity index 95% rename from OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous2Builder.cs rename to OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous2Builder.cs index f8e1815..48d5b73 100644 --- a/OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous2Builder.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous2Builder.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.Tests.OddsApi.Converter; +namespace OddsCollector.Functions.Tests.OddsApi.Converter; [Parallelizable(ParallelScope.All)] internal class TestAnonymous2Builder diff --git a/OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous3Builder.cs b/OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous3Builder.cs similarity index 94% rename from OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous3Builder.cs rename to OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous3Builder.cs index bd8fd40..5077f81 100644 --- a/OddsCollector.Common.Tests/OddsApi/Converter/TestAnonymous3Builder.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Converter/TestAnonymous3Builder.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.Tests.OddsApi.Converter; +namespace OddsCollector.Functions.Tests.OddsApi.Converter; [Parallelizable(ParallelScope.All)] internal sealed class TestAnonymous3Builder diff --git a/OddsCollector.Common.Tests/OddsApi/Models/EventPredictionBuilderTests.cs b/OddsCollector.Functions.Tests/OddsApi/Models/EventPredictionBuilderTests.cs similarity index 98% rename from OddsCollector.Common.Tests/OddsApi/Models/EventPredictionBuilderTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Models/EventPredictionBuilderTests.cs index 5351de0..7b578d1 100644 --- a/OddsCollector.Common.Tests/OddsApi/Models/EventPredictionBuilderTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Models/EventPredictionBuilderTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Common.Tests.OddsApi.Models; +namespace OddsCollector.Functions.Tests.OddsApi.Models; [Parallelizable(ParallelScope.All)] internal class EventPredictionBuilderTests diff --git a/OddsCollector.Common.Tests/OddsApi/Models/EventResultBuilderTests.cs b/OddsCollector.Functions.Tests/OddsApi/Models/EventResultBuilderTests.cs similarity index 97% rename from OddsCollector.Common.Tests/OddsApi/Models/EventResultBuilderTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Models/EventResultBuilderTests.cs index 25ad955..35b23b5 100644 --- a/OddsCollector.Common.Tests/OddsApi/Models/EventResultBuilderTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Models/EventResultBuilderTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Common.Tests.OddsApi.Models; +namespace OddsCollector.Functions.Tests.OddsApi.Models; [Parallelizable(ParallelScope.All)] internal class EventResultBuilderTests diff --git a/OddsCollector.Common.Tests/OddsApi/Models/OddBuilderTests.cs b/OddsCollector.Functions.Tests/OddsApi/Models/OddBuilderTests.cs similarity index 95% rename from OddsCollector.Common.Tests/OddsApi/Models/OddBuilderTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Models/OddBuilderTests.cs index e98122d..8c1a1af 100644 --- a/OddsCollector.Common.Tests/OddsApi/Models/OddBuilderTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Models/OddBuilderTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Common.Tests.OddsApi.Models; +namespace OddsCollector.Functions.Tests.OddsApi.Models; [Parallelizable(ParallelScope.All)] internal class OddBuilderTests diff --git a/OddsCollector.Common.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs b/OddsCollector.Functions.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs similarity index 97% rename from OddsCollector.Common.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs rename to OddsCollector.Functions.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs index 8833089..48167ca 100644 --- a/OddsCollector.Common.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/Models/UpcomingEventBuilderTests.cs @@ -1,7 +1,6 @@ -using FluentAssertions; -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Common.Tests.OddsApi.Models; +namespace OddsCollector.Functions.Tests.OddsApi.Models; [Parallelizable(ParallelScope.All)] internal class UpcomingEventBuilderTests diff --git a/OddsCollector.Common.Tests/OddsApi/OddsApiClientTests.cs b/OddsCollector.Functions.Tests/OddsApi/OddsApiClientTests.cs similarity index 95% rename from OddsCollector.Common.Tests/OddsApi/OddsApiClientTests.cs rename to OddsCollector.Functions.Tests/OddsApi/OddsApiClientTests.cs index 23dfa37..8945085 100644 --- a/OddsCollector.Common.Tests/OddsApi/OddsApiClientTests.cs +++ b/OddsCollector.Functions.Tests/OddsApi/OddsApiClientTests.cs @@ -1,13 +1,11 @@ -using FluentAssertions; -using Microsoft.Extensions.Options; -using NSubstitute; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi; -using OddsCollector.Common.OddsApi.Configuration; -using OddsCollector.Common.OddsApi.Converter; -using OddsCollector.Common.OddsApi.WebApi; - -namespace OddsCollector.Common.Tests.OddsApi; +using Microsoft.Extensions.Options; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi; +using OddsCollector.Functions.OddsApi.Configuration; +using OddsCollector.Functions.OddsApi.Converter; +using OddsCollector.Functions.OddsApi.WebApi; + +namespace OddsCollector.Functions.Tests.OddsApi; [Parallelizable(ParallelScope.All)] internal sealed class OddsApiClientTests diff --git a/OddsCollector.Common.Tests/OddsCollector.Common.Tests.csproj b/OddsCollector.Functions.Tests/OddsCollector.Functions.Tests.csproj similarity index 79% rename from OddsCollector.Common.Tests/OddsCollector.Common.Tests.csproj rename to OddsCollector.Functions.Tests/OddsCollector.Functions.Tests.csproj index f528384..c79a94e 100644 --- a/OddsCollector.Common.Tests/OddsCollector.Common.Tests.csproj +++ b/OddsCollector.Functions.Tests/OddsCollector.Functions.Tests.csproj @@ -19,14 +19,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/OddsCollector.Functions.Predictions.Tests/ServiceBusReceivedMessageFactory.cs b/OddsCollector.Functions.Tests/ServiceBus/ServiceBusReceivedMessageFactory.cs similarity index 92% rename from OddsCollector.Functions.Predictions.Tests/ServiceBusReceivedMessageFactory.cs rename to OddsCollector.Functions.Tests/ServiceBus/ServiceBusReceivedMessageFactory.cs index 7eb7a29..171a27a 100644 --- a/OddsCollector.Functions.Predictions.Tests/ServiceBusReceivedMessageFactory.cs +++ b/OddsCollector.Functions.Tests/ServiceBus/ServiceBusReceivedMessageFactory.cs @@ -3,7 +3,7 @@ using Azure.Core.Amqp; using Azure.Messaging.ServiceBus; -namespace OddsCollector.Functions.Predictions.Tests; +namespace OddsCollector.Functions.Tests.ServiceBus; internal static class ServiceBusReceivedMessageFactory { diff --git a/OddsCollector.Functions.Predictions.Tests/Strategies/AdjustedConsensusStrategyTests.cs b/OddsCollector.Functions.Tests/Strategies/AdjustedConsensusStrategyTests.cs similarity index 98% rename from OddsCollector.Functions.Predictions.Tests/Strategies/AdjustedConsensusStrategyTests.cs rename to OddsCollector.Functions.Tests/Strategies/AdjustedConsensusStrategyTests.cs index df52f40..702f1c1 100644 --- a/OddsCollector.Functions.Predictions.Tests/Strategies/AdjustedConsensusStrategyTests.cs +++ b/OddsCollector.Functions.Tests/Strategies/AdjustedConsensusStrategyTests.cs @@ -1,8 +1,7 @@ -using FluentAssertions; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Predictions.Strategies; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.Strategies; -namespace OddsCollector.Functions.Predictions.Tests.Strategies; +namespace OddsCollector.Functions.Tests.Strategies; [Parallelizable(ParallelScope.All)] internal class AdjustedConsensusStrategyTests diff --git a/OddsCollector.Functions.Predictions.Tests/Strategies/OddsBuilderExtensions.cs b/OddsCollector.Functions.Tests/Strategies/OddsBuilderExtensions.cs similarity index 82% rename from OddsCollector.Functions.Predictions.Tests/Strategies/OddsBuilderExtensions.cs rename to OddsCollector.Functions.Tests/Strategies/OddsBuilderExtensions.cs index c29ea09..b4ab6ca 100644 --- a/OddsCollector.Functions.Predictions.Tests/Strategies/OddsBuilderExtensions.cs +++ b/OddsCollector.Functions.Tests/Strategies/OddsBuilderExtensions.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Predictions.Tests.Strategies; +namespace OddsCollector.Functions.Tests.Strategies; internal static class OddsBuilderExtensions { diff --git a/OddsCollector.Functions.Predictions.Tests/Strategies/UpcomingEventBuilderExtensions.cs b/OddsCollector.Functions.Tests/Strategies/UpcomingEventBuilderExtensions.cs similarity index 92% rename from OddsCollector.Functions.Predictions.Tests/Strategies/UpcomingEventBuilderExtensions.cs rename to OddsCollector.Functions.Tests/Strategies/UpcomingEventBuilderExtensions.cs index 0c35473..37e19f4 100644 --- a/OddsCollector.Functions.Predictions.Tests/Strategies/UpcomingEventBuilderExtensions.cs +++ b/OddsCollector.Functions.Tests/Strategies/UpcomingEventBuilderExtensions.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Predictions.Tests.Strategies; +namespace OddsCollector.Functions.Tests.Strategies; internal static class UpcomingEventBuilderExtensions { diff --git a/OddsCollector.Functions.UpcomingEvents.Tests/GlobalUsings.cs b/OddsCollector.Functions.UpcomingEvents.Tests/GlobalUsings.cs deleted file mode 100644 index 9a28bd8..0000000 --- a/OddsCollector.Functions.UpcomingEvents.Tests/GlobalUsings.cs +++ /dev/null @@ -1 +0,0 @@ -global using NUnit.Framework; diff --git a/OddsCollector.Functions.UpcomingEvents.Tests/OddsCollector.Functions.UpcomingEvents.Tests.csproj b/OddsCollector.Functions.UpcomingEvents.Tests/OddsCollector.Functions.UpcomingEvents.Tests.csproj deleted file mode 100644 index e9eed20..0000000 --- a/OddsCollector.Functions.UpcomingEvents.Tests/OddsCollector.Functions.UpcomingEvents.Tests.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/OddsCollector.Functions.UpcomingEvents/.gitignore b/OddsCollector.Functions.UpcomingEvents/.gitignore deleted file mode 100644 index ff5b00c..0000000 --- a/OddsCollector.Functions.UpcomingEvents/.gitignore +++ /dev/null @@ -1,264 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# Azure Functions localsettings file -local.settings.json - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -project.fragment.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -#*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc \ No newline at end of file diff --git a/OddsCollector.Functions.UpcomingEvents/OddsCollector.Functions.UpcomingEvents.csproj b/OddsCollector.Functions.UpcomingEvents/OddsCollector.Functions.UpcomingEvents.csproj deleted file mode 100644 index 5dbcf4f..0000000 --- a/OddsCollector.Functions.UpcomingEvents/OddsCollector.Functions.UpcomingEvents.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - net8.0 - v4 - Exe - enable - enable - d189c59e-b718-45b4-a3fc-921f9de4e8a7 - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - Never - - - - - - \ No newline at end of file diff --git a/OddsCollector.Functions.UpcomingEvents/Program.cs b/OddsCollector.Functions.UpcomingEvents/Program.cs deleted file mode 100644 index d301db4..0000000 --- a/OddsCollector.Functions.UpcomingEvents/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Azure.Functions.Worker; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using OddsCollector.Common.OddsApi.Configuration; - -var host = new HostBuilder() - .ConfigureFunctionsWorkerDefaults() - .ConfigureServices(services => - { - services.AddOddsApiClientWithDependencies(); - services.AddApplicationInsightsTelemetryWorkerService(); - services.ConfigureFunctionsApplicationInsights(); - }) - .Build(); - -host.Run(); diff --git a/OddsCollector.Functions.UpcomingEvents/Properties/launchSettings.json b/OddsCollector.Functions.UpcomingEvents/Properties/launchSettings.json deleted file mode 100644 index 7f5736e..0000000 --- a/OddsCollector.Functions.UpcomingEvents/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "OddsCollector.Functions.UpcomingEvents": { - "commandName": "Project", - "commandLineArgs": "--port 7204", - "launchBrowser": false - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.json b/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.json deleted file mode 100644 index df4dcc9..0000000 --- a/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights" - }, - "storage1": { - "type": "storage", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.local.json b/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.local.json deleted file mode 100644 index b804a28..0000000 --- a/OddsCollector.Functions.UpcomingEvents/Properties/serviceDependencies.local.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "appInsights1": { - "type": "appInsights.sdk" - }, - "storage1": { - "type": "storage.emulator", - "connectionId": "AzureWebJobsStorage" - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.UpcomingEvents/host.json b/OddsCollector.Functions.UpcomingEvents/host.json deleted file mode 100644 index 5df170b..0000000 --- a/OddsCollector.Functions.UpcomingEvents/host.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "2.0", - "logging": { - "applicationInsights": { - "samplingSettings": { - "isEnabled": true, - "excludedTypes": "Request" - }, - "enableLiveMetricsFilters": true - } - } -} \ No newline at end of file diff --git a/OddsCollector.Functions.EventResults/.gitignore b/OddsCollector.Functions/.gitignore similarity index 100% rename from OddsCollector.Functions.EventResults/.gitignore rename to OddsCollector.Functions/.gitignore diff --git a/OddsCollector.Functions.Notification/CommunicationServices/Configuration/EmailSenderOptions.cs b/OddsCollector.Functions/CommunicationServices/Configuration/EmailSenderOptions.cs similarity index 91% rename from OddsCollector.Functions.Notification/CommunicationServices/Configuration/EmailSenderOptions.cs rename to OddsCollector.Functions/CommunicationServices/Configuration/EmailSenderOptions.cs index 0034ad2..678f640 100644 --- a/OddsCollector.Functions.Notification/CommunicationServices/Configuration/EmailSenderOptions.cs +++ b/OddsCollector.Functions/CommunicationServices/Configuration/EmailSenderOptions.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace OddsCollector.Functions.Notification.CommunicationServices.Configuration; +namespace OddsCollector.Functions.CommunicationServices.Configuration; internal sealed class EmailSenderOptions { diff --git a/OddsCollector.Functions.Notification/CommunicationServices/EmailSender.cs b/OddsCollector.Functions/CommunicationServices/EmailSender.cs similarity index 85% rename from OddsCollector.Functions.Notification/CommunicationServices/EmailSender.cs rename to OddsCollector.Functions/CommunicationServices/EmailSender.cs index fbbd75c..7f5ea4a 100644 --- a/OddsCollector.Functions.Notification/CommunicationServices/EmailSender.cs +++ b/OddsCollector.Functions/CommunicationServices/EmailSender.cs @@ -2,10 +2,10 @@ using Azure; using Azure.Communication.Email; using Microsoft.Extensions.Options; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Notification.CommunicationServices.Configuration; +using OddsCollector.Functions.CommunicationServices.Configuration; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.CommunicationServices; +namespace OddsCollector.Functions.CommunicationServices; internal sealed class EmailSender(IOptions? options, EmailClient? client) : IEmailSender { diff --git a/OddsCollector.Functions.Notification/CommunicationServices/IEmailSender.cs b/OddsCollector.Functions/CommunicationServices/IEmailSender.cs similarity index 56% rename from OddsCollector.Functions.Notification/CommunicationServices/IEmailSender.cs rename to OddsCollector.Functions/CommunicationServices/IEmailSender.cs index 2a87b60..a4c2363 100644 --- a/OddsCollector.Functions.Notification/CommunicationServices/IEmailSender.cs +++ b/OddsCollector.Functions/CommunicationServices/IEmailSender.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.CommunicationServices; +namespace OddsCollector.Functions.CommunicationServices; internal interface IEmailSender { diff --git a/OddsCollector.Functions.Notification/CosmosDb/ContainerFactory.cs b/OddsCollector.Functions/CosmosDb/ContainerFactory.cs similarity index 89% rename from OddsCollector.Functions.Notification/CosmosDb/ContainerFactory.cs rename to OddsCollector.Functions/CosmosDb/ContainerFactory.cs index 5c0e452..e36bbec 100644 --- a/OddsCollector.Functions.Notification/CosmosDb/ContainerFactory.cs +++ b/OddsCollector.Functions/CosmosDb/ContainerFactory.cs @@ -1,6 +1,6 @@ using Microsoft.Azure.Cosmos; -namespace OddsCollector.Functions.Notification.CosmosDb; +namespace OddsCollector.Functions.CosmosDb; internal static class ContainerFactory { diff --git a/OddsCollector.Functions.Notification/CosmosDb/CosmosDbClient.cs b/OddsCollector.Functions/CosmosDb/CosmosDbClient.cs similarity index 92% rename from OddsCollector.Functions.Notification/CosmosDb/CosmosDbClient.cs rename to OddsCollector.Functions/CosmosDb/CosmosDbClient.cs index 4747cb0..1a66335 100644 --- a/OddsCollector.Functions.Notification/CosmosDb/CosmosDbClient.cs +++ b/OddsCollector.Functions/CosmosDb/CosmosDbClient.cs @@ -1,8 +1,8 @@ using Microsoft.Azure.Cosmos; using Microsoft.Azure.Cosmos.Linq; -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.CosmosDb; +namespace OddsCollector.Functions.CosmosDb; internal sealed class CosmosDbClient(Container? container) : ICosmosDbClient { diff --git a/OddsCollector.Functions.Notification/CosmosDb/ICosmosDbClient.cs b/OddsCollector.Functions/CosmosDb/ICosmosDbClient.cs similarity index 60% rename from OddsCollector.Functions.Notification/CosmosDb/ICosmosDbClient.cs rename to OddsCollector.Functions/CosmosDb/ICosmosDbClient.cs index c050219..72b7fc0 100644 --- a/OddsCollector.Functions.Notification/CosmosDb/ICosmosDbClient.cs +++ b/OddsCollector.Functions/CosmosDb/ICosmosDbClient.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Notification.CosmosDb; +namespace OddsCollector.Functions.CosmosDb; internal interface ICosmosDbClient { diff --git a/OddsCollector.Functions.EventResults/EventResultsFunction.cs b/OddsCollector.Functions/Functions/EventResultsFunction.cs similarity index 69% rename from OddsCollector.Functions.EventResults/EventResultsFunction.cs rename to OddsCollector.Functions/Functions/EventResultsFunction.cs index 9965023..3e12146 100644 --- a/OddsCollector.Functions.EventResults/EventResultsFunction.cs +++ b/OddsCollector.Functions/Functions/EventResultsFunction.cs @@ -1,14 +1,14 @@ using System.Runtime.CompilerServices; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi; -[assembly: InternalsVisibleTo("OddsCollector.Functions.EventResults.Tests")] +[assembly: InternalsVisibleTo("OddsCollector.Functions.Tests")] // DynamicProxyGenAssembly2 is a temporary assembly built by mocking systems that use CastleProxy [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -namespace OddsCollector.Functions.EventResults; +namespace OddsCollector.Functions.Functions; internal sealed class EventResultsFunction(ILogger? logger, IOddsApiClient? client) { @@ -16,8 +16,8 @@ internal sealed class EventResultsFunction(ILogger? logger private readonly ILogger _logger = logger ?? throw new ArgumentNullException(nameof(logger)); [Function(nameof(EventResultsFunction))] - [CosmosDBOutput("%CosmosDb:Database%", "%CosmosDb:Container%", Connection = "CosmosDb:Connection")] - public async Task Run([TimerTrigger("%TimerInterval%")] CancellationToken cancellationToken) + [CosmosDBOutput("%CosmosDb:Database%", "%CosmosDb:EventResultsContainer%", Connection = "CosmosDb:Connection")] + public async Task Run([TimerTrigger("%EventResultsFunction:TimerInterval%")] CancellationToken cancellationToken) { try { diff --git a/OddsCollector.Functions.Notification/NotificationFunction.cs b/OddsCollector.Functions/Functions/NotificationFunction.cs similarity index 61% rename from OddsCollector.Functions.Notification/NotificationFunction.cs rename to OddsCollector.Functions/Functions/NotificationFunction.cs index 2e2bad5..ce7634a 100644 --- a/OddsCollector.Functions.Notification/NotificationFunction.cs +++ b/OddsCollector.Functions/Functions/NotificationFunction.cs @@ -1,14 +1,9 @@ -using System.Runtime.CompilerServices; -using Microsoft.Azure.Functions.Worker; +using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -using OddsCollector.Functions.Notification.CommunicationServices; -using OddsCollector.Functions.Notification.CosmosDb; +using OddsCollector.Functions.CommunicationServices; +using OddsCollector.Functions.CosmosDb; -[assembly: InternalsVisibleTo("OddsCollector.Functions.Notification.Tests")] -// DynamicProxyGenAssembly2 is a temporary assembly built by mocking systems that use CastleProxy -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] - -namespace OddsCollector.Functions.Notification; +namespace OddsCollector.Functions.Functions; internal sealed class NotificationFunction(ILogger? logger, IEmailSender? sender, ICosmosDbClient? client) { @@ -17,7 +12,7 @@ internal sealed class NotificationFunction(ILogger? logger private readonly ILogger _logger = logger ?? throw new ArgumentNullException(nameof(logger)); [Function(nameof(NotificationFunction))] - public async Task Run([TimerTrigger("%TimerInterval%")] CancellationToken cancellationToken) + public async Task Run([TimerTrigger("%NotificationFunction:TimerInterval%")] CancellationToken cancellationToken) { try { diff --git a/OddsCollector.Functions.Predictions/PredictionFunction.cs b/OddsCollector.Functions/Functions/PredictionFunction.cs similarity index 69% rename from OddsCollector.Functions.Predictions/PredictionFunction.cs rename to OddsCollector.Functions/Functions/PredictionFunction.cs index 9695863..276c877 100644 --- a/OddsCollector.Functions.Predictions/PredictionFunction.cs +++ b/OddsCollector.Functions/Functions/PredictionFunction.cs @@ -1,15 +1,10 @@ -using System.Runtime.CompilerServices; -using Azure.Messaging.ServiceBus; +using Azure.Messaging.ServiceBus; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -using OddsCollector.Common.Models; -using OddsCollector.Functions.Predictions.Strategies; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.Strategies; -[assembly: InternalsVisibleTo("OddsCollector.Functions.Predictions.Tests")] -// DynamicProxyGenAssembly2 is a temporary assembly built by mocking systems that use CastleProxy -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] - -namespace OddsCollector.Functions.Predictions; +namespace OddsCollector.Functions.Functions; internal sealed class PredictionFunction(ILogger? logger, IPredictionStrategy? strategy) { @@ -17,14 +12,14 @@ internal sealed class PredictionFunction(ILogger? logger, IP private readonly ILogger _logger = logger ?? throw new ArgumentNullException(nameof(logger)); [Function(nameof(PredictionFunction))] - [CosmosDBOutput("%CosmosDb:Database%", "%CosmosDb:Container%", Connection = "CosmosDb:Connection")] + [CosmosDBOutput("%CosmosDb:Database%", "%CosmosDb:EventPredictionsContainer%", Connection = "CosmosDb:Connection")] public async Task Run( [ServiceBusTrigger("%ServiceBus:Queue%", Connection = "ServiceBus:Connection", IsBatched = true)] ServiceBusReceivedMessage[] messages, ServiceBusMessageActions messageActions, CancellationToken cancellationToken) { List predictions = []; - for (int i = 0; i < messages.Length; i++) + for (var i = 0; i < messages.Length; i++) { try { diff --git a/OddsCollector.Functions.UpcomingEvents/UpcomingEventsFunction.cs b/OddsCollector.Functions/Functions/UpcomingEventsFunction.cs similarity index 60% rename from OddsCollector.Functions.UpcomingEvents/UpcomingEventsFunction.cs rename to OddsCollector.Functions/Functions/UpcomingEventsFunction.cs index d2ae5c4..4828ec3 100644 --- a/OddsCollector.Functions.UpcomingEvents/UpcomingEventsFunction.cs +++ b/OddsCollector.Functions/Functions/UpcomingEventsFunction.cs @@ -1,14 +1,9 @@ -using System.Runtime.CompilerServices; -using Microsoft.Azure.Functions.Worker; +using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi; -[assembly: InternalsVisibleTo("OddsCollector.Functions.UpcomingEvents.Tests")] -// DynamicProxyGenAssembly2 is a temporary assembly built by mocking systems that use CastleProxy -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] - -namespace OddsCollector.Functions.UpcomingEvents; +namespace OddsCollector.Functions.Functions; internal sealed class UpcomingEventsFunction(ILogger? logger, IOddsApiClient? client) { @@ -17,7 +12,7 @@ internal sealed class UpcomingEventsFunction(ILogger? lo [Function(nameof(UpcomingEventsFunction))] [ServiceBusOutput("%ServiceBus:Queue%", Connection = "ServiceBus:Connection")] - public async Task Run([TimerTrigger("%TimerInterval%")] CancellationToken cancellationToken) + public async Task Run([TimerTrigger("%UpcomingEventsFunction:TimerInterval%")] CancellationToken cancellationToken) { try { diff --git a/OddsCollector.Common/Models/Constants.cs b/OddsCollector.Functions/Models/Constants.cs similarity index 62% rename from OddsCollector.Common/Models/Constants.cs rename to OddsCollector.Functions/Models/Constants.cs index a570e0b..89e062e 100644 --- a/OddsCollector.Common/Models/Constants.cs +++ b/OddsCollector.Functions/Models/Constants.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public static class Constants { diff --git a/OddsCollector.Common/Models/EventPrediction.cs b/OddsCollector.Functions/Models/EventPrediction.cs similarity index 95% rename from OddsCollector.Common/Models/EventPrediction.cs rename to OddsCollector.Functions/Models/EventPrediction.cs index 16a1c16..fa1d817 100644 --- a/OddsCollector.Common/Models/EventPrediction.cs +++ b/OddsCollector.Functions/Models/EventPrediction.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class EventPrediction { diff --git a/OddsCollector.Common/Models/EventPredictionBuilder.cs b/OddsCollector.Functions/Models/EventPredictionBuilder.cs similarity index 97% rename from OddsCollector.Common/Models/EventPredictionBuilder.cs rename to OddsCollector.Functions/Models/EventPredictionBuilder.cs index 5f9ec60..72c44c4 100644 --- a/OddsCollector.Common/Models/EventPredictionBuilder.cs +++ b/OddsCollector.Functions/Models/EventPredictionBuilder.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class EventPredictionBuilder { diff --git a/OddsCollector.Common/Models/EventResult.cs b/OddsCollector.Functions/Models/EventResult.cs similarity index 90% rename from OddsCollector.Common/Models/EventResult.cs rename to OddsCollector.Functions/Models/EventResult.cs index a96f720..6cd74dc 100644 --- a/OddsCollector.Common/Models/EventResult.cs +++ b/OddsCollector.Functions/Models/EventResult.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class EventResult { diff --git a/OddsCollector.Common/Models/EventResultBuilder.cs b/OddsCollector.Functions/Models/EventResultBuilder.cs similarity index 95% rename from OddsCollector.Common/Models/EventResultBuilder.cs rename to OddsCollector.Functions/Models/EventResultBuilder.cs index 4668dfb..70fed45 100644 --- a/OddsCollector.Common/Models/EventResultBuilder.cs +++ b/OddsCollector.Functions/Models/EventResultBuilder.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class EventResultBuilder { diff --git a/OddsCollector.Common/Models/Odd.cs b/OddsCollector.Functions/Models/Odd.cs similarity index 80% rename from OddsCollector.Common/Models/Odd.cs rename to OddsCollector.Functions/Models/Odd.cs index a087e0f..44dd6ce 100644 --- a/OddsCollector.Common/Models/Odd.cs +++ b/OddsCollector.Functions/Models/Odd.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class Odd { diff --git a/OddsCollector.Common/Models/OddBuilder.cs b/OddsCollector.Functions/Models/OddBuilder.cs similarity index 94% rename from OddsCollector.Common/Models/OddBuilder.cs rename to OddsCollector.Functions/Models/OddBuilder.cs index 45523d8..cab4128 100644 --- a/OddsCollector.Common/Models/OddBuilder.cs +++ b/OddsCollector.Functions/Models/OddBuilder.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class OddBuilder { diff --git a/OddsCollector.Common/Models/UpcomingEvent.cs b/OddsCollector.Functions/Models/UpcomingEvent.cs similarity index 90% rename from OddsCollector.Common/Models/UpcomingEvent.cs rename to OddsCollector.Functions/Models/UpcomingEvent.cs index 9736bc8..d5b2ae8 100644 --- a/OddsCollector.Common/Models/UpcomingEvent.cs +++ b/OddsCollector.Functions/Models/UpcomingEvent.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class UpcomingEvent { diff --git a/OddsCollector.Common/Models/UpcomingEventBuilder.cs b/OddsCollector.Functions/Models/UpcomingEventBuilder.cs similarity index 97% rename from OddsCollector.Common/Models/UpcomingEventBuilder.cs rename to OddsCollector.Functions/Models/UpcomingEventBuilder.cs index 7ef6983..632d41e 100644 --- a/OddsCollector.Common/Models/UpcomingEventBuilder.cs +++ b/OddsCollector.Functions/Models/UpcomingEventBuilder.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.Models; +namespace OddsCollector.Functions.Models; public class UpcomingEventBuilder { diff --git a/OddsCollector.Common/OddsApi/Configuration/OddsApiClientOptions.cs b/OddsCollector.Functions/OddsApi/Configuration/OddsApiClientOptions.cs similarity index 90% rename from OddsCollector.Common/OddsApi/Configuration/OddsApiClientOptions.cs rename to OddsCollector.Functions/OddsApi/Configuration/OddsApiClientOptions.cs index a699d39..2a7c2a1 100644 --- a/OddsCollector.Common/OddsApi/Configuration/OddsApiClientOptions.cs +++ b/OddsCollector.Functions/OddsApi/Configuration/OddsApiClientOptions.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Common.OddsApi.Configuration; +namespace OddsCollector.Functions.OddsApi.Configuration; public class OddsApiClientOptions { diff --git a/OddsCollector.Common/OddsApi/Configuration/ServiceCollectionExtensions.cs b/OddsCollector.Functions/OddsApi/Configuration/ServiceCollectionExtensions.cs similarity index 84% rename from OddsCollector.Common/OddsApi/Configuration/ServiceCollectionExtensions.cs rename to OddsCollector.Functions/OddsApi/Configuration/ServiceCollectionExtensions.cs index c4ae1c3..af44a6e 100644 --- a/OddsCollector.Common/OddsApi/Configuration/ServiceCollectionExtensions.cs +++ b/OddsCollector.Functions/OddsApi/Configuration/ServiceCollectionExtensions.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; -using OddsCollector.Common.OddsApi.Converter; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.OddsApi.Converter; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.OddsApi.Configuration; +namespace OddsCollector.Functions.OddsApi.Configuration; public static class ServiceCollectionExtensions { diff --git a/OddsCollector.Common/OddsApi/Converter/IOddsApiObjectConverter.cs b/OddsCollector.Functions/OddsApi/Converter/IOddsApiObjectConverter.cs similarity index 66% rename from OddsCollector.Common/OddsApi/Converter/IOddsApiObjectConverter.cs rename to OddsCollector.Functions/OddsApi/Converter/IOddsApiObjectConverter.cs index ed2a1ef..2182106 100644 --- a/OddsCollector.Common/OddsApi/Converter/IOddsApiObjectConverter.cs +++ b/OddsCollector.Functions/OddsApi/Converter/IOddsApiObjectConverter.cs @@ -1,7 +1,7 @@ -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.OddsApi.Converter; +namespace OddsCollector.Functions.OddsApi.Converter; public interface IOddsApiObjectConverter { diff --git a/OddsCollector.Common/OddsApi/Converter/OddsApiObjectConverter.cs b/OddsCollector.Functions/OddsApi/Converter/OddsApiObjectConverter.cs similarity index 97% rename from OddsCollector.Common/OddsApi/Converter/OddsApiObjectConverter.cs rename to OddsCollector.Functions/OddsApi/Converter/OddsApiObjectConverter.cs index bc875fc..7535207 100644 --- a/OddsCollector.Common/OddsApi/Converter/OddsApiObjectConverter.cs +++ b/OddsCollector.Functions/OddsApi/Converter/OddsApiObjectConverter.cs @@ -1,8 +1,8 @@ using System.Globalization; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.OddsApi.Converter; +namespace OddsCollector.Functions.OddsApi.Converter; public class OddsApiObjectConverter : IOddsApiObjectConverter { diff --git a/OddsCollector.Common/OddsApi/IOddsApiClient.cs b/OddsCollector.Functions/OddsApi/IOddsApiClient.cs similarity index 78% rename from OddsCollector.Common/OddsApi/IOddsApiClient.cs rename to OddsCollector.Functions/OddsApi/IOddsApiClient.cs index 30b4730..4ef4657 100644 --- a/OddsCollector.Common/OddsApi/IOddsApiClient.cs +++ b/OddsCollector.Functions/OddsApi/IOddsApiClient.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Common.OddsApi; +namespace OddsCollector.Functions.OddsApi; public interface IOddsApiClient { diff --git a/OddsCollector.Common/OddsApi/OddsApiClient.cs b/OddsCollector.Functions/OddsApi/OddsApiClient.cs similarity index 89% rename from OddsCollector.Common/OddsApi/OddsApiClient.cs rename to OddsCollector.Functions/OddsApi/OddsApiClient.cs index cc2dc8b..939ecaf 100644 --- a/OddsCollector.Common/OddsApi/OddsApiClient.cs +++ b/OddsCollector.Functions/OddsApi/OddsApiClient.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Options; -using OddsCollector.Common.Models; -using OddsCollector.Common.OddsApi.Configuration; -using OddsCollector.Common.OddsApi.Converter; -using OddsCollector.Common.OddsApi.WebApi; +using OddsCollector.Functions.Models; +using OddsCollector.Functions.OddsApi.Configuration; +using OddsCollector.Functions.OddsApi.Converter; +using OddsCollector.Functions.OddsApi.WebApi; -namespace OddsCollector.Common.OddsApi; +namespace OddsCollector.Functions.OddsApi; public class OddsApiClient(IOptions? options, IClient? webApiClient, IOddsApiObjectConverter? objectConverter) : IOddsApiClient diff --git a/OddsCollector.Common/OddsApi/WebApi/WebApiClient.cs b/OddsCollector.Functions/OddsApi/WebApi/WebApiClient.cs similarity index 99% rename from OddsCollector.Common/OddsApi/WebApi/WebApiClient.cs rename to OddsCollector.Functions/OddsApi/WebApi/WebApiClient.cs index 05bfce0..cbbfd9f 100644 --- a/OddsCollector.Common/OddsApi/WebApi/WebApiClient.cs +++ b/OddsCollector.Functions/OddsApi/WebApi/WebApiClient.cs @@ -17,7 +17,7 @@ #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" #pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" -namespace OddsCollector.Common.OddsApi.WebApi +namespace OddsCollector.Functions.OddsApi.WebApi { using System = global::System; diff --git a/OddsCollector.Common/OddsApi/WebApi/parameters.nswag b/OddsCollector.Functions/OddsApi/WebApi/parameters.nswag similarity index 98% rename from OddsCollector.Common/OddsApi/WebApi/parameters.nswag rename to OddsCollector.Functions/OddsApi/WebApi/parameters.nswag index c5644d1..188d8e1 100644 --- a/OddsCollector.Common/OddsApi/WebApi/parameters.nswag +++ b/OddsCollector.Functions/OddsApi/WebApi/parameters.nswag @@ -56,7 +56,7 @@ "wrapResponseMethods": [], "generateResponseClasses": true, "responseClass": "SwaggerResponse", - "namespace": "OddsCollector.Common.OddsApi.WebApi", + "namespace": "OddsCollector.Functions.OddsApi.WebApi", "requiredPropertiesMustBeDefined": true, "dateType": "System.DateTime", "jsonConverters": null, diff --git a/OddsCollector.Common/OddsApi/WebApi/swagger.json b/OddsCollector.Functions/OddsApi/WebApi/swagger.json similarity index 100% rename from OddsCollector.Common/OddsApi/WebApi/swagger.json rename to OddsCollector.Functions/OddsApi/WebApi/swagger.json diff --git a/OddsCollector.Functions.Notification/OddsCollector.Functions.Notification.csproj b/OddsCollector.Functions/OddsCollector.Functions.csproj similarity index 74% rename from OddsCollector.Functions.Notification/OddsCollector.Functions.Notification.csproj rename to OddsCollector.Functions/OddsCollector.Functions.csproj index d99aecd..d46b944 100644 --- a/OddsCollector.Functions.Notification/OddsCollector.Functions.Notification.csproj +++ b/OddsCollector.Functions/OddsCollector.Functions.csproj @@ -5,19 +5,18 @@ Exe enable enable - 9ea695c5-e3f8-4cfd-9a17-4b9b088255b4 + + - - - + @@ -27,6 +26,10 @@ PreserveNewest Never + + true + PreserveNewest + diff --git a/OddsCollector.Functions.Notification/Program.cs b/OddsCollector.Functions/Program.cs similarity index 76% rename from OddsCollector.Functions.Notification/Program.cs rename to OddsCollector.Functions/Program.cs index 0689081..94f89a0 100644 --- a/OddsCollector.Functions.Notification/Program.cs +++ b/OddsCollector.Functions/Program.cs @@ -2,9 +2,11 @@ using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using OddsCollector.Functions.Notification.CommunicationServices; -using OddsCollector.Functions.Notification.CommunicationServices.Configuration; -using OddsCollector.Functions.Notification.CosmosDb; +using OddsCollector.Functions.CommunicationServices; +using OddsCollector.Functions.CommunicationServices.Configuration; +using OddsCollector.Functions.CosmosDb; +using OddsCollector.Functions.OddsApi.Configuration; +using OddsCollector.Functions.Strategies; var host = new HostBuilder() .ConfigureFunctionsWorkerDefaults() @@ -26,10 +28,12 @@ // workaround for https://github.com/MicrosoftDocs/azure-docs/issues/32962 Environment.GetEnvironmentVariable("CosmosDb:Connection"), Environment.GetEnvironmentVariable("CosmosDb:Database"), - Environment.GetEnvironmentVariable("CosmosDb:Container") + Environment.GetEnvironmentVariable("CosmosDb:EventPredictionsContainer") )); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.AddOddsApiClientWithDependencies(); services.AddApplicationInsightsTelemetryWorkerService(); services.ConfigureFunctionsApplicationInsights(); }) diff --git a/OddsCollector.Functions.Predictions/Properties/launchSettings.json b/OddsCollector.Functions/Properties/launchSettings.json similarity index 51% rename from OddsCollector.Functions.Predictions/Properties/launchSettings.json rename to OddsCollector.Functions/Properties/launchSettings.json index a7008c6..a223535 100644 --- a/OddsCollector.Functions.Predictions/Properties/launchSettings.json +++ b/OddsCollector.Functions/Properties/launchSettings.json @@ -1,8 +1,8 @@ { "profiles": { - "OddsCollector.Functions.Predictions": { + "OddsCollector.Functions": { "commandName": "Project", - "commandLineArgs": "--port 7082", + "commandLineArgs": "--port 7270", "launchBrowser": false } } diff --git a/OddsCollector.Functions.EventResults/Properties/serviceDependencies.json b/OddsCollector.Functions/Properties/serviceDependencies.json similarity index 100% rename from OddsCollector.Functions.EventResults/Properties/serviceDependencies.json rename to OddsCollector.Functions/Properties/serviceDependencies.json diff --git a/OddsCollector.Functions.EventResults/Properties/serviceDependencies.local.json b/OddsCollector.Functions/Properties/serviceDependencies.local.json similarity index 100% rename from OddsCollector.Functions.EventResults/Properties/serviceDependencies.local.json rename to OddsCollector.Functions/Properties/serviceDependencies.local.json diff --git a/OddsCollector.Functions.Predictions/Strategies/AdjustedConsensusStrategy.cs b/OddsCollector.Functions/Strategies/AdjustedConsensusStrategy.cs similarity index 95% rename from OddsCollector.Functions.Predictions/Strategies/AdjustedConsensusStrategy.cs rename to OddsCollector.Functions/Strategies/AdjustedConsensusStrategy.cs index a82a3e7..41a1f83 100644 --- a/OddsCollector.Functions.Predictions/Strategies/AdjustedConsensusStrategy.cs +++ b/OddsCollector.Functions/Strategies/AdjustedConsensusStrategy.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Predictions.Strategies; +namespace OddsCollector.Functions.Strategies; /// /// Based on this article @@ -56,7 +56,7 @@ private static StrategyScore GetWinner(IEnumerable odds, string awayTeam, s private static double CalculateAdjustedScore(IEnumerable odds, Func filter, double adjustment) { var average = odds.Select(filter).Average(); - return average == 0 ? 0 : (1 / average) - adjustment; + return average == 0 ? 0 : 1 / average - adjustment; } private static Odd GetBestOdd(IEnumerable odds, string winner, string awayTeam, string homeTeam) diff --git a/OddsCollector.Functions.Predictions/Strategies/IPredictionStrategy.cs b/OddsCollector.Functions/Strategies/IPredictionStrategy.cs similarity index 57% rename from OddsCollector.Functions.Predictions/Strategies/IPredictionStrategy.cs rename to OddsCollector.Functions/Strategies/IPredictionStrategy.cs index e6d87d1..8339d7f 100644 --- a/OddsCollector.Functions.Predictions/Strategies/IPredictionStrategy.cs +++ b/OddsCollector.Functions/Strategies/IPredictionStrategy.cs @@ -1,6 +1,6 @@ -using OddsCollector.Common.Models; +using OddsCollector.Functions.Models; -namespace OddsCollector.Functions.Predictions.Strategies; +namespace OddsCollector.Functions.Strategies; internal interface IPredictionStrategy { diff --git a/OddsCollector.Functions.Predictions/Strategies/StrategyScore.cs b/OddsCollector.Functions/Strategies/StrategyScore.cs similarity index 74% rename from OddsCollector.Functions.Predictions/Strategies/StrategyScore.cs rename to OddsCollector.Functions/Strategies/StrategyScore.cs index b2e2635..8bbdcc9 100644 --- a/OddsCollector.Functions.Predictions/Strategies/StrategyScore.cs +++ b/OddsCollector.Functions/Strategies/StrategyScore.cs @@ -1,4 +1,4 @@ -namespace OddsCollector.Functions.Predictions.Strategies; +namespace OddsCollector.Functions.Strategies; internal class StrategyScore { diff --git a/OddsCollector.Functions/host.json b/OddsCollector.Functions/host.json new file mode 100644 index 0000000..ee5cf5f --- /dev/null +++ b/OddsCollector.Functions/host.json @@ -0,0 +1,12 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + }, + "enableLiveMetricsFilters": true + } + } +} \ No newline at end of file diff --git a/OddsCollector.sln b/OddsCollector.sln index 1e13358..e1fc33c 100644 --- a/OddsCollector.sln +++ b/OddsCollector.sln @@ -3,25 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Common", "OddsCollector.Common\OddsCollector.Common.csproj", "{A4E8E9AE-BDB6-4D3D-BACB-E19943EEBE21}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions", "OddsCollector.Functions\OddsCollector.Functions.csproj", "{E00C0443-7186-44D9-B0A7-3426B8FC1AB6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.Predictions", "OddsCollector.Functions.Predictions\OddsCollector.Functions.Predictions.csproj", "{E427E449-B4BC-4E5E-AA34-C922A590C66D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.Notification", "OddsCollector.Functions.Notification\OddsCollector.Functions.Notification.csproj", "{9661ECAE-E716-4D08-84A4-C3473D02C903}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.UpcomingEvents", "OddsCollector.Functions.UpcomingEvents\OddsCollector.Functions.UpcomingEvents.csproj", "{FD8EE075-0EF2-4DE5-AA3F-D7B1191941FD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.EventResults", "OddsCollector.Functions.EventResults\OddsCollector.Functions.EventResults.csproj", "{702E280C-DC3F-48DA-A341-3255334A5402}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Common.Tests", "OddsCollector.Common.Tests\OddsCollector.Common.Tests.csproj", "{0A5F1BC2-027B-4474-9C7E-6B00C8CCF7CD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.EventResults.Tests", "OddsCollector.Functions.EventResults.Tests\OddsCollector.Functions.EventResults.Tests.csproj", "{406DE1F4-069B-4189-8AA2-994CC1140BC6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.UpcomingEvents.Tests", "OddsCollector.Functions.UpcomingEvents.Tests\OddsCollector.Functions.UpcomingEvents.Tests.csproj", "{D2E01FC2-A174-40FC-BC56-6EE3FD640AE1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.Predictions.Tests", "OddsCollector.Functions.Predictions.Tests\OddsCollector.Functions.Predictions.Tests.csproj", "{296C1955-19D3-49E5-A4E5-E68424525E8E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OddsCollector.Functions.Notification.Tests", "OddsCollector.Functions.Notification.Tests\OddsCollector.Functions.Notification.Tests.csproj", "{687A2464-8366-4077-8AE6-00F6E3D40905}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OddsCollector.Functions.Tests", "OddsCollector.Functions.Tests\OddsCollector.Functions.Tests.csproj", "{A724B26F-C05E-4C65-A5C2-0B358E431E28}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -29,46 +13,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A4E8E9AE-BDB6-4D3D-BACB-E19943EEBE21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4E8E9AE-BDB6-4D3D-BACB-E19943EEBE21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4E8E9AE-BDB6-4D3D-BACB-E19943EEBE21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4E8E9AE-BDB6-4D3D-BACB-E19943EEBE21}.Release|Any CPU.Build.0 = Release|Any CPU - {E427E449-B4BC-4E5E-AA34-C922A590C66D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E427E449-B4BC-4E5E-AA34-C922A590C66D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E427E449-B4BC-4E5E-AA34-C922A590C66D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E427E449-B4BC-4E5E-AA34-C922A590C66D}.Release|Any CPU.Build.0 = Release|Any CPU - {9661ECAE-E716-4D08-84A4-C3473D02C903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9661ECAE-E716-4D08-84A4-C3473D02C903}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9661ECAE-E716-4D08-84A4-C3473D02C903}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9661ECAE-E716-4D08-84A4-C3473D02C903}.Release|Any CPU.Build.0 = Release|Any CPU - {FD8EE075-0EF2-4DE5-AA3F-D7B1191941FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD8EE075-0EF2-4DE5-AA3F-D7B1191941FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD8EE075-0EF2-4DE5-AA3F-D7B1191941FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD8EE075-0EF2-4DE5-AA3F-D7B1191941FD}.Release|Any CPU.Build.0 = Release|Any CPU - {702E280C-DC3F-48DA-A341-3255334A5402}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {702E280C-DC3F-48DA-A341-3255334A5402}.Debug|Any CPU.Build.0 = Debug|Any CPU - {702E280C-DC3F-48DA-A341-3255334A5402}.Release|Any CPU.ActiveCfg = Release|Any CPU - {702E280C-DC3F-48DA-A341-3255334A5402}.Release|Any CPU.Build.0 = Release|Any CPU - {0A5F1BC2-027B-4474-9C7E-6B00C8CCF7CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A5F1BC2-027B-4474-9C7E-6B00C8CCF7CD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A5F1BC2-027B-4474-9C7E-6B00C8CCF7CD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A5F1BC2-027B-4474-9C7E-6B00C8CCF7CD}.Release|Any CPU.Build.0 = Release|Any CPU - {406DE1F4-069B-4189-8AA2-994CC1140BC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {406DE1F4-069B-4189-8AA2-994CC1140BC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {406DE1F4-069B-4189-8AA2-994CC1140BC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {406DE1F4-069B-4189-8AA2-994CC1140BC6}.Release|Any CPU.Build.0 = Release|Any CPU - {D2E01FC2-A174-40FC-BC56-6EE3FD640AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2E01FC2-A174-40FC-BC56-6EE3FD640AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2E01FC2-A174-40FC-BC56-6EE3FD640AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2E01FC2-A174-40FC-BC56-6EE3FD640AE1}.Release|Any CPU.Build.0 = Release|Any CPU - {296C1955-19D3-49E5-A4E5-E68424525E8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {296C1955-19D3-49E5-A4E5-E68424525E8E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {296C1955-19D3-49E5-A4E5-E68424525E8E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {296C1955-19D3-49E5-A4E5-E68424525E8E}.Release|Any CPU.Build.0 = Release|Any CPU - {687A2464-8366-4077-8AE6-00F6E3D40905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {687A2464-8366-4077-8AE6-00F6E3D40905}.Debug|Any CPU.Build.0 = Debug|Any CPU - {687A2464-8366-4077-8AE6-00F6E3D40905}.Release|Any CPU.ActiveCfg = Release|Any CPU - {687A2464-8366-4077-8AE6-00F6E3D40905}.Release|Any CPU.Build.0 = Release|Any CPU + {E00C0443-7186-44D9-B0A7-3426B8FC1AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E00C0443-7186-44D9-B0A7-3426B8FC1AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E00C0443-7186-44D9-B0A7-3426B8FC1AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E00C0443-7186-44D9-B0A7-3426B8FC1AB6}.Release|Any CPU.Build.0 = Release|Any CPU + {A724B26F-C05E-4C65-A5C2-0B358E431E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A724B26F-C05E-4C65-A5C2-0B358E431E28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A724B26F-C05E-4C65-A5C2-0B358E431E28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A724B26F-C05E-4C65-A5C2-0B358E431E28}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE