Skip to content

Commit

Permalink
Merge branch 'main' into v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Feb 20, 2025
2 parents 50d0e5a + d44084a commit 2bdb05b
Show file tree
Hide file tree
Showing 109 changed files with 2,907 additions and 335 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET 9.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

Expand Down
36 changes: 19 additions & 17 deletions Build.slnf
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"solution": {
"path": "ShinyMediator.sln",
"projects": [
"src\\Shiny.Mediator\\Shiny.Mediator.csproj",
"src\\Shiny.Mediator.AppSupport\\Shiny.Mediator.AppSupport.csproj",
"src\\Shiny.Mediator.AspNet\\Shiny.Mediator.AspNet.csproj",
"src\\Shiny.Mediator.Blazor\\Shiny.Mediator.Blazor.csproj",
"src\\Shiny.Mediator.Caching.MicrosoftMemoryCache\\Shiny.Mediator.Caching.MicrosoftMemoryCache.csproj",
"src\\Shiny.Mediator.Contracts\\Shiny.Mediator.Contracts.csproj",
"src\\Shiny.Mediator.DapperRequests\\Shiny.Mediator.DapperRequests.csproj",
"src\\Shiny.Mediator.FluentValidation\\Shiny.Mediator.FluentValidation.csproj",
"src\\Shiny.Mediator.Maui\\Shiny.Mediator.Maui.csproj",
"src\\Shiny.Mediator.Prism\\Shiny.Mediator.Prism.csproj",
"src\\Shiny.Mediator.Resilience\\Shiny.Mediator.Resilience.csproj",
"src\\Shiny.Mediator.SourceGenerators\\Shiny.Mediator.SourceGenerators.csproj"
]
}
"solution": {
"path": "ShinyMediator.sln",
"projects": [
"src\\Shiny.Mediator\\Shiny.Mediator.csproj",
"src\\Shiny.Mediator.AppSupport\\Shiny.Mediator.AppSupport.csproj",
"src\\Shiny.Mediator.AspNet\\Shiny.Mediator.AspNet.csproj",
"src\\Shiny.Mediator.Blazor\\Shiny.Mediator.Blazor.csproj",
"src\\Shiny.Mediator.Caching.MicrosoftMemoryCache\\Shiny.Mediator.Caching.MicrosoftMemoryCache.csproj",
"src\\Shiny.Mediator.Contracts\\Shiny.Mediator.Contracts.csproj",
"src\\Shiny.Mediator.DapperRequests\\Shiny.Mediator.DapperRequests.csproj",
"src\\Shiny.Mediator.FluentValidation\\Shiny.Mediator.FluentValidation.csproj",
"src\\Shiny.Mediator.Maui\\Shiny.Mediator.Maui.csproj",
"src\\Shiny.Mediator.Prism\\Shiny.Mediator.Prism.csproj",
"src\\Shiny.Mediator.Resilience\\Shiny.Mediator.Resilience.csproj",
"src\\Shiny.Mediator.SourceGenerators\\Shiny.Mediator.SourceGenerators.csproj",
"src\\Shiny.Mediator.Uno\\Shiny.Mediator.Uno.csproj",
"src\\Shiny.Mediator.Sentry\\Shiny.Mediator.Sentry.csproj"
]
}
}
19 changes: 19 additions & 0 deletions ShinyMediator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Api", "samples\Sampl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Mediator.DapperRequests", "src\Shiny.Mediator.DapperRequests\Shiny.Mediator.DapperRequests.csproj", "{C49D80C1-68E1-4730-8AAE-A4890ECF89C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Mediator.Uno", "src\Shiny.Mediator.Uno\Shiny.Mediator.Uno.csproj", "{24DB79F2-629D-45C2-A63A-1780D6A6C921}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Uno", "samples\Sample.Uno\Sample.Uno.csproj", "{A8B5A8CC-77FA-49C4-9251-3F65959FC591}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Mediator.Sentry", "src\Shiny.Mediator.Sentry\Shiny.Mediator.Sentry.csproj", "{49D52C58-7AFE-4847-8571-7FB6A01E94FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -120,11 +126,24 @@ Global
{C49D80C1-68E1-4730-8AAE-A4890ECF89C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C49D80C1-68E1-4730-8AAE-A4890ECF89C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C49D80C1-68E1-4730-8AAE-A4890ECF89C4}.Release|Any CPU.Build.0 = Release|Any CPU
{24DB79F2-629D-45C2-A63A-1780D6A6C921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24DB79F2-629D-45C2-A63A-1780D6A6C921}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24DB79F2-629D-45C2-A63A-1780D6A6C921}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24DB79F2-629D-45C2-A63A-1780D6A6C921}.Release|Any CPU.Build.0 = Release|Any CPU
{A8B5A8CC-77FA-49C4-9251-3F65959FC591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8B5A8CC-77FA-49C4-9251-3F65959FC591}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8B5A8CC-77FA-49C4-9251-3F65959FC591}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8B5A8CC-77FA-49C4-9251-3F65959FC591}.Release|Any CPU.Build.0 = Release|Any CPU
{49D52C58-7AFE-4847-8571-7FB6A01E94FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49D52C58-7AFE-4847-8571-7FB6A01E94FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49D52C58-7AFE-4847-8571-7FB6A01E94FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49D52C58-7AFE-4847-8571-7FB6A01E94FD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0075777D-C7AF-4075-ACEA-88D1E1BE205A} = {967E9F7E-D082-4E7F-934B-D3BD05D1C22F}
{D5E10100-9EE4-4ED7-B1F4-2B22E37225C6} = {967E9F7E-D082-4E7F-934B-D3BD05D1C22F}
{A94FECD0-EB11-4D77-83F5-E3D25820C79B} = {967E9F7E-D082-4E7F-934B-D3BD05D1C22F}
{AFEE02F0-ED0D-4257-BA65-DDBFBB31CB5B} = {967E9F7E-D082-4E7F-934B-D3BD05D1C22F}
{A8B5A8CC-77FA-49C4-9251-3F65959FC591} = {967E9F7E-D082-4E7F-934B-D3BD05D1C22F}
EndGlobalSection
EndGlobal
29 changes: 29 additions & 0 deletions samples/Sample.Uno/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Application x:Class="Sample.Uno.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:utum="using:Uno.Toolkit.UI.Material">

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<utum:MaterialToolkitTheme
ColorOverrideSource="ms-appx:///Styles/ColorPaletteOverride.xaml">
<!-- NOTE: You can override the default Roboto font by providing your font assets here. -->
<!-- <utum:MaterialToolkitTheme.FontOverrideDictionary>
<ResourceDictionary>
<FontFamily x:Key="MaterialLightFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialMediumFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialRegularFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf#Roboto</FontFamily>
</ResourceDictionary>
</utum:MaterialToolkitTheme.FontOverrideDictionary> -->
</utum:MaterialToolkitTheme>
</ResourceDictionary.MergedDictionaries>

<!-- Add resources here -->

</ResourceDictionary>
</Application.Resources>

</Application>
97 changes: 97 additions & 0 deletions samples/Sample.Uno/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
using Shiny.Mediator;
using Uno.Resizetizer;

namespace Sample.Uno;

public partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
}

protected Window? MainWindow { get; private set; }
protected IHost? Host { get; private set; }

protected async override void OnLaunched(LaunchActivatedEventArgs args)
{
var builder = this.CreateBuilder(args)
// Add navigation support for toolkit controls such as TabBar and NavigationView
.UseToolkitNavigation()
.Configure(host => host
#if DEBUG
// Switch to Development environment when running in DEBUG
.UseEnvironment(Environments.Development)
#endif
.UseLogging(configure: (context, logBuilder) =>
{
// Configure log levels for different categories of logging
logBuilder
.SetMinimumLevel(
context.HostingEnvironment.IsDevelopment() ? LogLevel.Information : LogLevel.Warning)

// Default filters for core Uno Platform namespaces
.CoreLogLevel(LogLevel.Warning);

// Uno Platform namespace filter groups
// Uncomment individual methods to see more detailed logging
//// Generic Xaml events
//logBuilder.XamlLogLevel(LogLevel.Debug);
//// Layout specific messages
//logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
//// Storage messages
//logBuilder.StorageLogLevel(LogLevel.Debug);
//// Binding related messages
//logBuilder.XamlBindingLogLevel(LogLevel.Debug);
//// Binder memory references tracking
//logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
//// DevServer and HotReload related
//logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
//// Debug JS interop
//logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
}, enableUnoLogging: true)
.UseConfiguration(configure: configBuilder =>
configBuilder
.EmbeddedSource<App>()
.Section<AppConfig>()
)
.UseNavigation(RegisterRoutes)
.AddShinyMediator(x => x
.AddUnoPersistentCache()
)
.ConfigureServices(s => s.AddDiscoveredMediatorHandlersFromSample_Uno())
);

MainWindow = builder.Window;

#if DEBUG
MainWindow.UseStudio();
#endif
MainWindow.SetWindowIcon();

Host = await builder.NavigateAsync<Shell>();
}

static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
{
views.Register(
new ViewMap(ViewModel: typeof(ShellViewModel)),
new ViewMap<MainPage, MainViewModel>(),
new ViewMap<SecondPage, SecondViewModel>()
);

routes.Register(
new RouteMap("", View: views.FindByViewModel<ShellViewModel>(),
Nested:
[
new("Main", View: views.FindByViewModel<MainViewModel>(), IsDefault: true),
new("Second", View: views.FindByViewModel<SecondViewModel>()),
]
)
);
}
}
42 changes: 42 additions & 0 deletions samples/Sample.Uno/Assets/Icons/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2bdb05b

Please sign in to comment.