-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from nabond251/feature/init-rearch-reactor
Feature/init rearch reactor
- Loading branch information
Showing
60 changed files
with
1,786 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34330.188 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F67704B8-9273-407A-B93B-7874ADCF060B}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rearch", "src\Rearch\Rearch.csproj", "{900169C0-3D32-430A-95C1-A713507A243D}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{075AFD96-7D62-4387-BD0E-829BCBC5CA3B}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rearch.Tests", "tests\Rearch.Tests\Rearch.Tests.csproj", "{0583184D-B026-4170-88D4-AD8876930160}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rearch.Reactor", "src\Rearch.Reactor\Rearch.Reactor.csproj", "{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{900169C0-3D32-430A-95C1-A713507A243D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{900169C0-3D32-430A-95C1-A713507A243D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{900169C0-3D32-430A-95C1-A713507A243D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{900169C0-3D32-430A-95C1-A713507A243D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{0583184D-B026-4170-88D4-AD8876930160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{0583184D-B026-4170-88D4-AD8876930160}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{0583184D-B026-4170-88D4-AD8876930160}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{0583184D-B026-4170-88D4-AD8876930160}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{900169C0-3D32-430A-95C1-A713507A243D} = {F67704B8-9273-407A-B93B-7874ADCF060B} | ||
{0583184D-B026-4170-88D4-AD8876930160} = {075AFD96-7D62-4387-BD0E-829BCBC5CA3B} | ||
{B150E8CB-1350-4F5A-9521-2EDF3C7BB42D} = {F67704B8-9273-407A-B93B-7874ADCF060B} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B463A10B-699E-45A9-AAFE-ACCA65D8CADD} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions
6
tests/Rearch.Example.Tests/stylecop.json → examples/Rearch.Example/stylecop.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
global using Microsoft.Maui; | ||
global using Microsoft.Maui.Graphics; | ||
global using Microsoft.Maui.Hosting; | ||
global using MauiControls = Microsoft.Maui.Controls; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using MauiReactor; | ||
using Microsoft.Extensions.Logging; | ||
using ReactorData; | ||
using ReactorData.Sqlite; | ||
using System; | ||
using System.IO; | ||
using System.Reflection.Metadata; | ||
using Rearch.Reactor.Components; | ||
using Rearch.Reactor.Example.Models; | ||
using Rearch.Reactor.Example.Pages; | ||
|
||
namespace Rearch.Reactor.Example; | ||
|
||
public static class MauiProgram | ||
{ | ||
static readonly string _dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "todo_app.db"); | ||
|
||
public static MauiApp CreateMauiApp() | ||
{ | ||
//if (File.Exists(_dbPath)) | ||
//{ | ||
// File.Delete(_dbPath); | ||
//} | ||
|
||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseRearchReactorApp<MainPage>(app => | ||
{ | ||
//app.AddResource("Resources/Styles/Colors.xaml"); | ||
//app.AddResource("Resources/Styles/Styles.xaml"); | ||
}) | ||
#if DEBUG | ||
.EnableMauiReactorHotReload() | ||
#endif | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
fonts.AddFont("OpenSans-SemiBold.ttf", "OpenSansSemiBold"); | ||
}); | ||
|
||
#if DEBUG | ||
builder.Logging.AddDebug(); | ||
#endif | ||
//ReactorData | ||
builder.Services.AddReactorDataWithSqlite( | ||
connectionString: $"Data Source={_dbPath}", | ||
configure: _ => _.Model<Todo>(), | ||
modelContextConfigure: options => | ||
{ | ||
options.Dispatcher = action => | ||
{ | ||
if (MauiControls.Application.Current?.Dispatcher.IsDispatchRequired == true) | ||
{ | ||
MauiControls.Application.Current?.Dispatcher.Dispatch(action); | ||
} | ||
}; | ||
options.ConfigureContext = context => context.Load<Todo>(); | ||
}); | ||
|
||
|
||
return builder.Build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using ReactorData; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Rearch.Reactor.Example.Models; | ||
|
||
[Model] | ||
partial class Todo | ||
{ | ||
public int Id { get; set; } | ||
|
||
public required string Task { get; set; } | ||
|
||
public bool Done { get; set; } | ||
} |
Oops, something went wrong.