Skip to content

Commit

Permalink
Merge pull request #2 from noftwaresoftware/dotnet8
Browse files Browse the repository at this point in the history
Upgraded to .NET 8.
  • Loading branch information
noftwaresoftware authored Nov 21, 2023
2 parents 15e2e27 + 804bf9d commit 619b3ed
Show file tree
Hide file tree
Showing 67 changed files with 469 additions and 620 deletions.
6 changes: 1 addition & 5 deletions BulkUploader.Console/Enumerations.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Ignore Spelling: Noftware Faux Uploader

namespace Noftware.In.Faux.BulkUploader
{
Expand Down
6 changes: 2 additions & 4 deletions BulkUploader.Console/Helpers.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
// Ignore Spelling: Noftware Faux Uploader

using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noftware.In.Faux.BulkUploader
{
Expand Down
12 changes: 6 additions & 6 deletions BulkUploader.Console/In.Faux.BulkUploader.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Noftware.In.Faux.BulkUploader</RootNamespace>
<AssemblyName>BulkUploader</AssemblyName>
</PropertyGroup>
Expand All @@ -12,11 +12,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 8 additions & 7 deletions BulkUploader.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using System;
// Ignore Spelling: Noftware Faux Uploader

using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Linq;
using System.Threading.Tasks;
using Noftware.In.Faux.Data.Azure;
using Noftware.In.Faux.Core.Data;
using Noftware.In.Faux.Data.Azure.Entities;
using Noftware.In.Faux.Data.Repositories;
using Noftware.In.Faux.Core.Extensions;
using Noftware.In.Faux.Core.Models;
using Noftware.In.Faux.Core.Services;
using Noftware.In.Faux.Data.Azure.Entities;
using Noftware.In.Faux.Data.Repositories;
using Noftware.In.Faux.Data.Services;

namespace Noftware.In.Faux.BulkUploader
Expand Down Expand Up @@ -76,7 +77,7 @@ public static async Task Main(string[] args)
PersistenceMode mode;

// If arguments are specified, ensure they are valid
if (args?.Any() == true)
if (args?.Length > 0)
{
// Only a single argument is supported
if (args.Length > 1)
Expand Down
31 changes: 10 additions & 21 deletions BulkUploader.Console/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
using Microsoft.Extensions.Configuration;
// Ignore Spelling: Noftware Faux Uploader

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Noftware.In.Faux.Data.Azure;
using Noftware.In.Faux.Data.Azure.Entities;
using Noftware.In.Faux.Data.Repositories;
using Noftware.In.Faux.Data.Services;
using Noftware.In.Faux.Core.Data;
using Noftware.In.Faux.Core.Services;
using Noftware.In.Faux.Core.Extensions;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Noftware.In.Faux.Core.Models;
using Noftware.In.Faux.Core.Services;
using Noftware.In.Faux.Data.Azure.Entities;
using Noftware.In.Faux.Data.Repositories;
using Noftware.In.Faux.Data.Services;

namespace Noftware.In.Faux.BulkUploader
{
/// <summary>
/// DI startup.
/// </summary>
public class Startup
/// <param name="configuration">Represents a set of key/value application configuration properties.</param>
public class Startup(IConfiguration configuration)
{
/// <summary>
/// Constructor.
/// </summary>
/// <param name="configuration">Represents a set of key/value application configuration properties.</param>
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

/// <summary>
/// Represents a set of key/value application configuration properties.
/// </summary>
public IConfiguration Configuration { get; }
public IConfiguration Configuration { get; } = configuration;

/// <summary>
/// This method gets called by the runtime. Use this method to add services to the container.
Expand Down
8 changes: 4 additions & 4 deletions Client/In.Faux.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Noftware.In.Faux.Client</RootNamespace>
<AssemblyName>Noftware.In.Faux.Client</AssemblyName>
</PropertyGroup>
Expand All @@ -12,9 +12,9 @@

<ItemGroup>
<PackageReference Include="BlazorPro.Spinkit" Version="1.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 2 additions & 9 deletions Client/Pages/Quotes/Components/QuoteButton.razor.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
// Ignore Spelling: Noftware Faux

using System.Threading.Tasks;
using System.Threading;
using Noftware.In.Faux.Core.Models;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Noftware.In.Faux.Core.Services;
using Microsoft.Extensions.Configuration;
using Noftware.In.Faux.Client.Services;
using Noftware.In.Faux.Client.ViewModels;
Expand Down
9 changes: 3 additions & 6 deletions Client/Pages/Quotes/Components/QuoteDisplay.razor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Components;
// Ignore Spelling: Noftware Faux

using Microsoft.AspNetCore.Components;
using Noftware.In.Faux.Client.ViewModels;
using Noftware.In.Faux.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Noftware.In.Faux.Client.Pages.Quotes.Components
{
Expand Down
18 changes: 8 additions & 10 deletions Client/Pages/Quotes/Components/QuoteList.razor.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
// Ignore Spelling: Noftware Faux

using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Configuration;
using Noftware.In.Faux.Client.Services;
using Noftware.In.Faux.Client.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noftware.In.Faux.Client.Pages.Quotes.Components
{
Expand Down Expand Up @@ -53,12 +51,12 @@ private async Task DisplayQuoteAsync(ViewQuote quote)
// Get the display image, if it was not loaded
if (quote.Base64Image == null)
{
await this.BusyIndicatorVisibilityAsync(quote, showBusyIndicator: true);
await BusyIndicatorVisibilityAsync(quote, showBusyIndicator: true);

string resizedImage = await this.QuoteService.GetResizedImageAsync(quote.Key, quote.FileName);
quote.Base64Image = resizedImage;

await this.BusyIndicatorVisibilityAsync(quote, showBusyIndicator: false);
await BusyIndicatorVisibilityAsync(quote, showBusyIndicator: false);
}

// Does the 'display' image need to be fetched?
Expand All @@ -85,7 +83,7 @@ private async Task DisplayQuoteAsync(ViewQuote quote)
/// <param name="quote">The associated quote's row to show the busy indicator within.</param>
/// <param name="showBusyIndicator">True to show or false to hide.</param>
/// <returns><see cref="Task"/></returns>
private async Task BusyIndicatorVisibilityAsync(ViewQuote quote, bool showBusyIndicator)
private static async Task BusyIndicatorVisibilityAsync(ViewQuote quote, bool showBusyIndicator)
{
// Show or hide busy indicator
quote.SearchShowBusyIndicator = showBusyIndicator;
Expand Down
12 changes: 4 additions & 8 deletions Client/Pages/Quotes/Components/QuoteRandom.razor.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using Microsoft.AspNetCore.Components;
// Ignore Spelling: Noftware Faux

using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Noftware.In.Faux.Client.Services;
using Noftware.In.Faux.Client.ViewModels;
using Noftware.In.Faux.Core.Models;
using Noftware.In.Faux.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noftware.In.Faux.Client.Pages.Quotes.Components
{
Expand Down
12 changes: 5 additions & 7 deletions Client/Pages/Quotes/Components/QuoteSearch.razor.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
using System;
// Ignore Spelling: Noftware Faux

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;
using System.Threading;
using Noftware.In.Faux.Core.Models;
using Microsoft.AspNetCore.Components;
using Noftware.In.Faux.Core.Extensions;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.Configuration;
using Noftware.In.Faux.Client.Services;
using Noftware.In.Faux.Client.ViewModels;
using Microsoft.AspNetCore.Components.Web;
using Noftware.In.Faux.Core.Extensions;

namespace Noftware.In.Faux.Client.Pages.Quotes.Components
{
Expand Down
11 changes: 3 additions & 8 deletions Client/Pages/Quotes/Components/QuoteTimer.razor.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
// Ignore Spelling: Noftware Faux

using System;
using System.Threading.Tasks;
using System.Threading;
using Noftware.In.Faux.Core.Models;
using Microsoft.AspNetCore.Components;
using Noftware.In.Faux.Core.Services;
using Microsoft.Extensions.Configuration;
using Noftware.In.Faux.Client.Services;
using Noftware.In.Faux.Client.ViewModels;
Expand Down
11 changes: 4 additions & 7 deletions Client/Pages/Quotes/Timer.Razor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Components;
// Ignore Spelling: Noftware Faux

using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noftware.In.Faux.Client.Pages.Quotes
{
Expand All @@ -27,7 +24,7 @@ public partial class Timer
/// </summary>
protected override void OnInitialized()
{
int.TryParse(Configuration["TimerRefreshSeconds"], out SecondsRefresh);
_ = int.TryParse(Configuration["TimerRefreshSeconds"], out SecondsRefresh);
}
}
}
11 changes: 5 additions & 6 deletions Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using Noftware.In.Faux.Core.Services;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Noftware.In.Faux.Client.Services;
// Ignore Spelling: Noftware Faux

using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Noftware.In.Faux.Client.Services;

namespace Noftware.In.Faux.Client
{
Expand Down
17 changes: 7 additions & 10 deletions Client/Services/ClientQuoteService.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Noftware.In.Faux.Client.ViewModels;
using Noftware.In.Faux.Core.Models;
using System;
// Ignore Spelling: Noftware Faux

using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Noftware.In.Faux.Client.ViewModels;
using Noftware.In.Faux.Core.Models;

namespace Noftware.In.Faux.Client.Services
{
Expand Down Expand Up @@ -76,10 +76,7 @@ public async Task<ViewQuote> GetRandomQuoteAsync()


// If quote is still empty, get the default out-of-the-box one
if (quote is null)
{
quote = Quote.GetDefault();
}
quote ??= Quote.GetDefault();

// Map to view model
if (quote is not null)
Expand Down
7 changes: 3 additions & 4 deletions Client/Services/IClientQuoteService.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Noftware.In.Faux.Client.ViewModels;
using System;
// Ignore Spelling: Noftware Faux

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Noftware.In.Faux.Client.ViewModels;

namespace Noftware.In.Faux.Client.Services
{
Expand Down
6 changes: 1 addition & 5 deletions Client/ViewModels/ViewQuote.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Ignore Spelling: Noftware Faux

namespace Noftware.In.Faux.Client.ViewModels
{
Expand Down
6 changes: 1 addition & 5 deletions Client/ViewModels/ViewQuoteFileName.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Ignore Spelling: Noftware Faux

namespace Noftware.In.Faux.Client.ViewModels
{
Expand Down
Loading

0 comments on commit 619b3ed

Please sign in to comment.