Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Oct 2, 2024
1 parent aa67154 commit 2d1a253
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
25 changes: 22 additions & 3 deletions src/content/docs/client/mediator/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ title: Quick Start
import { Steps } from '@astrojs/starlight/components';
import NugetBadge from '../../../../components/NugetBadge.tsx';

# Quick Start
# Quick Start - MAUI

<Steps>
1. Install <NugetBadge name="Shiny.Mediator" label="Shiny.Mediator" />
1. Install <NugetBadge name="Shiny.Mediator" label="Shiny.Mediator" /> & <NugetBadge name="Shiny.Mediator.Maui" label="Shiny.Mediator.Maui" />

2. First, let's create our request & event handlers

Expand Down Expand Up @@ -73,7 +73,7 @@ import NugetBadge from '../../../../components/NugetBadge.tsx';
.CreateBuilder()
.UseMauiApp<App>();

builder.Services.AddShinyMediator();
builder.Services.AddShinyMediator(x => x.UseMaui());

// AddSingletonAsImplementedInterfaces/AddScopedAsImplementedInterfaces are extension methods we've added to IServiceCollection
// that allow you to register all interfaces that a class implements
Expand Down Expand Up @@ -154,6 +154,25 @@ Lastly, if your page/viewmodel is navigated away from (popped), it will no longe
:::
</Steps>

## Quick Start - Blazor

<Steps>

1. Install <NugetBadge name="Shiny.Mediator" label="Shiny.Mediator" /> & <NugetBadge name="Shiny.Mediator.Blazor" label="Shiny.Mediator.Blazor" />
2. Create your handlers just like MAUI above
3. Setup Mediator with Blazor component event collection
```csharp
builder.Services.AddShinyMediator(x => x.UseBlazor());
```
4. In your main index/app.razor, add the following underneath the Blazor script
```html
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Shiny.Mediator.Blazor/Mediator.js"></script>
```

</Steps>


## Source Generated Registration

When you install Shiny.Mediator, we include a source generator that will create a set of attributes that you can mark
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/release-notes/mediator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import RN from '../../../components/ReleaseNote.astro';
# 2.0.0 - TBD
<RN type="feature">Most middleware and internal handlers now support configuration via Microsoft.Extensions.Configuration vs using attributes - HTTP, Timer Refresh, Offline, Stream Replay, Performance Logging, Caching, User Notifications</RN>
<RN type="feature">Blazor now supports offline, stream replay, and user notification middleware</RN>
<RN type="feature">Execution Context allows you to add metadata from middleware that can be consumed by the caller (IMediator.RequestWithContext return ExecutionResult, Send now returns ExecutionContext)</RN>
<RN type="feature">ExecutionContext allows you to add metadata from middleware that can be consumed by the caller (IMediator.RequestWithContext return ExecutionResult, Send now returns ExecutionContext)</RN>
<RN type="feature">EventAggregatedExecutionContext(List of EventExecutionContext) allows you to add metadata from middleware that can be consumed by the caller - IMediator.Publish now returns this by default</RN>
<RN type="enhancement">OpenApiGenerator now allows DateOnly, TimeOnly, and Stream results</RN>
<RN type="enhancement">OpenApiGenerator offers better support for inline enums and subtypes (node based APIs)</RN>
<RN type="enhancement">Improved logging, so you can see your pipeline execution pipeline front to back</RN>
Expand Down

0 comments on commit 2d1a253

Please sign in to comment.