Skip to content

Commit

Permalink
Merge pull request #725 from sitkoru/beta
Browse files Browse the repository at this point in the history
.NET 7
  • Loading branch information
SonicGD committed Jan 19, 2023
2 parents b76652d + 89fa171 commit 34a62c6
Show file tree
Hide file tree
Showing 623 changed files with 7,967 additions and 8,641 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
env:
DB__POSTGRES__TESTDBCONTEXT__HOST: postgres
DB__POSTGRES__SECONDTESTDBCONTEXT__HOST: postgres
DB__POSTGRES__TPHDBCONTEXT__HOST: postgres
TESTS__USEPOSTGRES: "true"
services:
postgres:
Expand Down
4 changes: 4 additions & 0 deletions Sitko.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{109B331E-71B9-483C-8FC1-13B10C92A7F1}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Packages.props = src\Directory.Packages.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitko.Core.IdProvider.SonyFlake", "src\Sitko.Core.IdProvider.SonyFlake\Sitko.Core.IdProvider.SonyFlake.csproj", "{6677865F-C349-4D25-9E19-3DEC43E92DD5}"
Expand Down Expand Up @@ -175,6 +176,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitko.Core.Blazor.AntDesign", "src\Sitko.Core.Blazor.AntDesign\Sitko.Core.Blazor.AntDesign.csproj", "{F570ACCF-3B22-4AFF-93C8-659FF28205E2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{F626F7B7-70BB-4D3B-A803-68ADA8BA4234}"
ProjectSection(SolutionItems) = preProject
apps\Directory.Build.props = apps\Directory.Build.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitko.Core.Apps.Blazor", "apps\Sitko.Core.Apps.Blazor\Sitko.Core.Apps.Blazor.csproj", "{FD711E57-272D-436C-991C-62D317920DD0}"
EndProject
Expand Down
3 changes: 3 additions & 0 deletions Sitko.Core.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EF/@EntryIndexedValue">EF</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HTTPS/@EntryIndexedValue">HTTPS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PK/@EntryIndexedValue">PK</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sitko/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
6 changes: 6 additions & 0 deletions apps/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<WarningsAsErrors>CS4014;CA2016</WarningsAsErrors>
<NoWarn>CA1848;CA1716;BL0007;CA1711</NoWarn>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion apps/Sitko.Core.Apps.Blazor/Sitko.Core.Apps.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="AntDesign.ProLayout" Version="0.12.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.10">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 0 additions & 4 deletions apps/Sitko.Core.Apps.MudBlazorDemo/Forms/BarForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,5 @@ public void RemoveFoo(FooModel foo)
}

public void DeleteFoo() => Entity.Foo = null;

[Parameter] public RenderFragment<BarForm> ChildContent { get; set; } = null!;

protected override RenderFragment ChildContentFragment => ChildContent(this);
}
}
2 changes: 1 addition & 1 deletion apps/Sitko.Core.Apps.MudBlazorDemo/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</MudGrid>

<MudPageLayout Title="@LocalizationProvider["Title"]">
<BarRepositoryList @bind-RowsPerPage="RowsPerPage" OnDataLoaded="CountSummaryAsync" @ref="barList" Class="mb-10" EnableUrlNavigation="true"
<BarRepositoryList @bind-RowsPerPage="rowsPerPage" OnDataLoaded="CountSummaryAsync" @ref="barList" Class="mb-10" EnableUrlNavigation="true"
ConfigureQuery="ConfigureQueryAsync" AddParamsToUrl="AddParamsToUrlAsync"
GetParamsFromUrl="GetParamsFromUrlAsync">
<HeaderContent>
Expand Down
18 changes: 11 additions & 7 deletions apps/Sitko.Core.Apps.MudBlazorDemo/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
Expand All @@ -13,10 +14,11 @@ namespace Sitko.Core.Apps.MudBlazorDemo.Pages
{
public partial class Index
{
private int RowsPerPage = 10;
private int rowsPerPage = 10;
private const string FilterParamId = "id";
private const string FilterParamTitle = "title";
private const string FilterParamDateRange = "dateRange";

[Parameter]
[SupplyParameterFromQuery(Name = FilterParamId)]
public Guid? Id { get; set; }
Expand Down Expand Up @@ -75,9 +77,9 @@ public partial class Index
//

private FilterList FilterList { get; set; } = new();
private MudAutocomplete<BarModel> IdFilterAutocomplete { get; set; }
private MudAutocomplete<BarModel> IdFilterAutocomplete { get; set; } = null!;

[Inject] private BarRepository BarRepository { get; set; }
[Inject] private BarRepository BarRepository { get; set; } = null!;
private (BarModel[] items, int itemsCount) bars;

protected override async Task InitializeAsync()
Expand Down Expand Up @@ -112,11 +114,12 @@ private async Task SearchTitleAsync(string value)
private Task ConfigureQueryAsync(IRepositoryQuery<BarModel> query)
{
query
.Where(p => FilterList.Model == null || FilterList.Model.Id == Guid.Empty || p.Id == FilterList.Model.Id)
.Where(p => FilterList.Model == null || FilterList.Model.Id == Guid.Empty ||
p.Id == FilterList.Model.Id)
.Where(p => string.IsNullOrEmpty(FilterList.Title) || p.Bar == FilterList.Title)
.Where(p => FilterList.DateRange == null ||
p.Date >= new DateTimeOffset((DateTime)FilterList.DateRange.Start).UtcDateTime &&
p.Date <= new DateTimeOffset((DateTime)FilterList.DateRange.End).UtcDateTime);
(p.Date >= new DateTimeOffset((DateTime)FilterList.DateRange.Start!).UtcDateTime &&
p.Date <= new DateTimeOffset((DateTime)FilterList.DateRange.End!).UtcDateTime));

return Task.CompletedTask;
}
Expand Down Expand Up @@ -159,7 +162,8 @@ private Task GetParamsFromUrlAsync()
var dateData = DateRange.Split("-");
if (dateData.Length == 2)
{
FilterList.DateRange = new DateRange(DateTime.Parse(dateData[0]), DateTime.Parse(dateData[1]));
FilterList.DateRange = new DateRange(DateTime.Parse(dateData[0], CultureInfo.InvariantCulture),
DateTime.Parse(dateData[1], CultureInfo.InvariantCulture));
hasChanged = true;
}
}
Expand Down
8 changes: 4 additions & 4 deletions apps/Sitko.Core.Apps.MudBlazorDemo/Pages/Logging.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
@using Thinktecture.Extensions.Configuration
@using Serilog.Events
@inherits BaseComponent
@inject ISerilogConfiguration loggingConfiguration
@inject ISerilogConfiguration LoggingConfiguration
<MudPageLayout Title="Logging">
<MudButton Variant="Variant.Filled" Color="Color.Error" OnClick="@(() => loggingConfiguration.SetLevel(LogEventLevel.Debug))">Set debug</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="@(() => loggingConfiguration.SetLevel(LogEventLevel.Information))">Set info</MudButton>
<MudButton Color="Color.Secondary" Variant="Variant.Outlined" OnClick="@(() => loggingConfiguration.ResetLevel())">Reset</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Error" OnClick="@(() => LoggingConfiguration.SetLevel(LogEventLevel.Debug))">Set debug</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="@(() => LoggingConfiguration.SetLevel(LogEventLevel.Information))">Set info</MudButton>
<MudButton Color="Color.Secondary" Variant="Variant.Outlined" OnClick="@(() => LoggingConfiguration.ResetLevel())">Reset</MudButton>
</MudPageLayout>
4 changes: 2 additions & 2 deletions apps/Sitko.Core.Apps.MudBlazorDemo/Pages/Options.razor
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@page "/Options"
@using Sitko.Core.App
@using System.Text.Json
@inject Application application
@inject Application Application
<MudPageLayout Title="Options">
<pre>
@JsonSerializer.Serialize(application.GetModulesOptions(), new JsonSerializerOptions
@JsonSerializer.Serialize(Application.GetModulesOptions(), new JsonSerializerOptions
{
WriteIndented = true
})
Expand Down
Loading

0 comments on commit 34a62c6

Please sign in to comment.