-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
2,907 additions
and
335 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
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" | ||
] | ||
} | ||
} |
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,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> |
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,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>()), | ||
] | ||
) | ||
); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.