Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SpeechSynthesis package, testing new Clipboard package, some cleanup ... #55

Merged
merged 46 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bb0d294
Multi-targeting with .NET 8.
IEvangelist Oct 13, 2023
805cfef
Fix test path...
IEvangelist Oct 13, 2023
f240ad3
Gen AI triple slash...
IEvangelist Oct 13, 2023
b55a9c8
Fix the publish bits.
IEvangelist Oct 13, 2023
da91a52
Remove legacy switch
IEvangelist Oct 13, 2023
407d40e
Upgrade to .NET 8.0, and use Central Package Management.
IEvangelist Nov 17, 2023
3c8fc17
Fix merge issues.
IEvangelist Nov 17, 2023
b41b494
Upgrade a few versions...
IEvangelist Nov 17, 2023
8075e5a
Merge branch 'main' into 'new-parser'
Denny09310 Jul 2, 2024
e3e29ed
chore: remove globals.json
Denny09310 Jul 2, 2024
bdd211c
fix: merge issues
Denny09310 Jul 2, 2024
f11467c
feat: start using Typescript AST
Jul 12, 2024
c950ac0
chore: remove regex parsing for source, use new AST. For now use old …
Denny09310 Jul 15, 2024
7007138
chore: deep cleanup, apply sonar lint performance suggestions. Tests …
Denny09310 Jul 15, 2024
24cc118
fix: source generator not finding reference assembly
Denny09310 Jul 15, 2024
f5438d0
chore: code formatting
Denny09310 Jul 16, 2024
090bd49
feat: implmented AST into the parser and source writer
Denny09310 Jul 16, 2024
1d7e801
chore: updated some test to match the output
Denny09310 Jul 16, 2024
530e4b4
chore: split main into method, code readability
Denny09310 Jul 16, 2024
360ca0d
Merge branch 'feature/csharp-ast-parser' into develop
Denny09310 Jul 16, 2024
c91b1f6
fix: generic type not analyzed both for parses and builder, missing n…
Denny09310 Jul 16, 2024
e763e42
feat: remove all regexes
Denny09310 Jul 16, 2024
85b72e5
fix: url double encoded
Denny09310 Jul 16, 2024
bc34712
chore: split GetNodeText into function, add types examples of to handle
Denny09310 Jul 16, 2024
4b9cc7d
chore: create singleton for primitive mapping
Denny09310 Jul 16, 2024
58814fb
feat: add comment to classes, enhanched linq dependencies query (to c…
Denny09310 Jul 16, 2024
72ac9e5
feat: handled dependencies with custom record type and custom hashset…
Denny09310 Jul 17, 2024
5a45a56
chore: remove redundant interfaces inheritance
Denny09310 Jul 17, 2024
f167a2f
chore: add comments to explain future plans
Denny09310 Jul 17, 2024
caad2d2
Merge branch 'feature/syntax-improvements' into develop
Denny09310 Jul 17, 2024
0da636b
feat: fix code generation stop workin, split code generation in metho…
Denny09310 Jul 17, 2024
a46b6dc
chore: for now removed speech synthesis causing error. Looking for fix
Denny09310 Jul 17, 2024
486a387
fix: nullable types not entirely recognized, speech syntheis works, a…
Jul 18, 2024
b8a1428
feat: handle promises on webassembly, fix indentation for non pure ca…
Denny09310 Jul 18, 2024
3808f6f
feat: add initial clipboard api for webassembly
Denny09310 Jul 18, 2024
bcf284f
feat: add initial clipboard api for blazor server
Denny09310 Jul 18, 2024
f176a10
feat: add sample pages to show the basic clipboard
Denny09310 Jul 19, 2024
870afa2
Merge branch 'feature/clipboard-api' into develop
Denny09310 Jul 19, 2024
a7a45a0
chore: bump up dependencies, update localstorage test
Denny09310 Jul 19, 2024
e25706c
feat: add some sort of caching to avoid dependency loop
Denny09310 Jul 19, 2024
22b7097
chore: fix double culture info in range
Denny09310 Jul 19, 2024
8d95fd1
Merge 'IEvangelist/blazorators:new-parser' into 'Denny09310/blazorato…
Denny09310 Jul 23, 2024
429815e
fix: merge reverted dependencies
Denny09310 Jul 23, 2024
4cf63b7
fix: remove global invariant culture in favor of scoped one
Denny09310 Jul 23, 2024
2205cc1
fix: wrong package descriptions
Denny09310 Jul 23, 2024
7ce0d60
Add "WebAssembly" to the package name
Denny09310 Jul 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<!-- Use these versions regardless of TFM -->
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="5.0.0-beta.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageVersion Include="MinVer" Version="5.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="System.Reactive.Linq" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Basic.Reference.Assemblies" Version="1.4.5" />
<PackageVersion Include="System.Reactive.Linq" Version="6.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.Playwright" Version="1.45.1" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Basic.Reference.Assemblies" Version="1.7.2" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
</ItemGroup>
<!-- .NET 7.0 bits -->
Expand All @@ -28,11 +28,11 @@
</ItemGroup>
<!-- .NET 8.0 bits -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.7" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageVersion Include="Microsoft.JSInterop" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" />
<PackageVersion Include="Microsoft.JSInterop" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" />
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions blazorators.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServer.ExampleConsume
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.CacheStorage.WebAssembly", "src\Blazor.CacheStorage.WebAssembly\Blazor.CacheStorage.WebAssembly.csproj", "{38FE259D-0B98-495E-B376-D0F3C9CA12B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Clipboard.WebAssembly", "src\Blazor.Clipboard.WebAssembly\Blazor.Clipboard.WebAssembly.csproj", "{A6CFFD60-9533-4B6D-83EB-170B025A6DEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Clipboard", "src\Blazor.Clipboard\Blazor.Clipboard.csproj", "{2218709E-9A36-4578-BA30-D32A713C9481}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -134,6 +138,14 @@ Global
{38FE259D-0B98-495E-B376-D0F3C9CA12B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38FE259D-0B98-495E-B376-D0F3C9CA12B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38FE259D-0B98-495E-B376-D0F3C9CA12B0}.Release|Any CPU.Build.0 = Release|Any CPU
{A6CFFD60-9533-4B6D-83EB-170B025A6DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6CFFD60-9533-4B6D-83EB-170B025A6DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6CFFD60-9533-4B6D-83EB-170B025A6DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6CFFD60-9533-4B6D-83EB-170B025A6DEC}.Release|Any CPU.Build.0 = Release|Any CPU
{2218709E-9A36-4578-BA30-D32A713C9481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2218709E-9A36-4578-BA30-D32A713C9481}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2218709E-9A36-4578-BA30-D32A713C9481}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2218709E-9A36-4578-BA30-D32A713C9481}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -157,6 +169,8 @@ Global
{4D04B168-6971-4660-BC22-FA7F18150018} = {A644CEC3-BD94-4EB6-9BF0-86B562806BF9}
{31D54C48-6325-4591-8612-87A917D49028} = {91A35318-B03F-4D41-AE18-2C21B9D9C3F3}
{38FE259D-0B98-495E-B376-D0F3C9CA12B0} = {537EB83C-6982-40B0-801A-479DF3B17DBE}
{A6CFFD60-9533-4B6D-83EB-170B025A6DEC} = {537EB83C-6982-40B0-801A-479DF3B17DBE}
{2218709E-9A36-4578-BA30-D32A713C9481} = {537EB83C-6982-40B0-801A-479DF3B17DBE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F86284A-32D2-4F79-B23C-7A0CB8775971}
Expand Down
37 changes: 19 additions & 18 deletions samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Humanizer.Core" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Humanizer.Core" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Clipboard.WebAssembly\Blazor.Clipboard.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
<span class="oi oi-compass" aria-hidden="true"></span> Track
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink id="sandbox" class="nav-link" href="copyandpaste">
<span class="oi oi-clipboard" aria-hidden="true"></span> Clipboard
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink id="sandbox" class="nav-link" href="sandbox">
<span class="oi oi-inbox" aria-hidden="true"></span> Sandbox
Expand Down
17 changes: 17 additions & 0 deletions samples/Blazor.ExampleConsumer/Components/Pages/CopyAndPaste.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@page "/copyandpaste"

@inject IClipboardService Clipboard

<div class="mb-3">
<label for="clipboard-content" class="form-label">Your clipboard</label>
<textarea @bind=_content class="form-control" id="clipboard-content" rows="3"></textarea>
</div>

<div class="btn-group btn-group-lg">
<button type="button" class="btn btn-lg btn-primary" @onclick=@ReadAsync>
Read
</button>
<button type="button" class="btn btn-lg btn-danger" title="Stop" @onclick=@WriteAsync>
Write
</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) David Pine. All rights reserved.
// Licensed under the MIT License.

namespace Blazor.ExampleConsumer.Components.Pages;

public partial class CopyAndPaste
{
private string? _content;

private async Task ReadAsync()
{
_content = await Clipboard.ReadTextAsync();
}

private async Task WriteAsync()
{
await Clipboard.WriteTextAsync(_content ?? "");
}
}
24 changes: 12 additions & 12 deletions samples/Blazor.ExampleConsumer/Components/Pages/ReadToMe.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@

<div class="input-group w-75 mb-3">
<select class="form-select" aria-label="Voice selection"
@bind="_selectedVoice" disabled=@(_voices?.Any() is false)>
@bind="_selectedVoice" disabled=@(_voices?.Any() is false)>
@foreach (var voice in _voices ?? Array.Empty<SpeechSynthesisVoice>())
{
<option value="@voice.Name">@voice.Name</option>
}
</select>
<button class="btn btn-primary" type="button"
title="Refresh voices?" @onclick=@(async () => await GetVoicesAsync())>
<button class="btn btn-primary" type="button"
title="Refresh voices?" @onclick=@(async () => await GetVoicesAsync())>
<span class="oi oi-reload"></span>
</button>
</div>

<div class="input-group mb-3 w-75">
<label for="range" class="form-label">Voice speed: @_voiceSpeed</label>
<input type="range" min="@_voiceSpeeds.Min()" max="@_voiceSpeeds.Max()"
step=".25" class="form-range" id="range" list="speeds"
value="@_voiceSpeed"
@onchange=@OnVoiceSpeedChange>
step=".25" class="form-range" id="range" list="speeds"
@bind="@_voiceSpeed"
@bind:culture="System.Globalization.CultureInfo.InvariantCulture">
<datalist id="speeds">
@foreach (var speed in _voiceSpeeds)
{
<option value="@speed">speed</option>
}
@foreach (var speed in _voiceSpeeds)
{
<option value="@speed">speed</option>
}
</datalist>
</div>

Expand All @@ -37,7 +37,7 @@
Text-to-speech @(_elapsedTimeMessage is { Length: > 0 } ? $"({_elapsedTimeMessage})" : "")
</label>
<textarea class="form-control" id="text"
@oninput=@OnTextChanged rows="3" value=@_text>
@oninput=@OnTextChanged rows="3" value=@_text>
</textarea>
</div>

Expand All @@ -49,7 +49,7 @@
<button type="button" class="btn btn-lg btn-warning" title="Pause" @[email protected]>
<span class="oi oi-media-pause"></span>
</button>
<button type="button" class="btn btn-lg btn-info"title="Play" @[email protected]>
<button type="button" class="btn btn-lg btn-info" title="Play" @[email protected]>
<span class="oi oi-media-play"></span>
</button>
<button type="button" class="btn btn-lg btn-danger" title="Stop" @[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ async Task GetVoicesAsync(bool isFromCallback = false)

void OnTextChanged(ChangeEventArgs args) => _text = args.Value?.ToString();

void OnVoiceSpeedChange(ChangeEventArgs args) =>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Author

@Denny09310 Denny09310 Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a sample I've added the "InvariantGlobalization" tag to the csproj, this permit to use the "@Bind" directive in the range slider without the need to parse the double from a string, because at least in italian the decimal separator was causing issues parsing 0.75 into 75

_voiceSpeed = double.TryParse(args.Value?.ToString() ?? "1.5", out var speed)
? speed : 1.5;

void Speak() => SpeechSynthesis.Speak(
Utterance,
elapsedTime =>
Expand All @@ -96,4 +92,4 @@ void IDisposable.Dispose()

SpeechSynthesis.UnsubscribeFromVoicesChanged();
}
}
}
3 changes: 2 additions & 1 deletion samples/Blazor.ExampleConsumer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
builder.Services.AddSessionStorageServices();
builder.Services.AddGeolocationServices();
builder.Services.AddSpeechSynthesisServices();
builder.Services.AddClipboardServices();

// Custom library bits...
builder.Services.AddSpeechRecognitionServices();

await builder.Build().RunAsync();
await builder.Build().RunAsync();
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Humanizer.Core" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Humanizer.Core" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Clipboard\Blazor.Clipboard.csproj" />
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" />
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" />
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" />
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" />
</ItemGroup>

<ItemGroup>
<Content Update="Pages\CopyAndPaste.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions samples/BlazorServer.ExampleConsumer/Pages/CopyAndPaste.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@page "/copyandpaste"

@inject IClipboardService Clipboard

<div class="mb-3">
<label for="clipboard-content" class="form-label">Your clipboard</label>
<textarea @bind=_content class="form-control" id="clipboard-content" rows="3"></textarea>
</div>

<div class="btn-group btn-group-lg">
<button type="button" class="btn btn-lg btn-primary" @onclick=@ReadAsync>
Read
</button>
<button type="button" class="btn btn-lg btn-danger" title="Stop" @onclick=@WriteAsync>
Write
</button>
</div>
19 changes: 19 additions & 0 deletions samples/BlazorServer.ExampleConsumer/Pages/CopyAndPaste.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) David Pine. All rights reserved.
// Licensed under the MIT License.

namespace BlazorServer.ExampleConsumer.Pages;

public partial class CopyAndPaste
{
private string? _content;

private async Task ReadAsync()
{
_content = await Clipboard.ReadTextAsync();
}

private async Task WriteAsync()
{
await Clipboard.WriteTextAsync(_content ?? "");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed partial class ListenToMe : IDisposable

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender is false)
if (!firstRender)
{
return;
}
Expand Down
Loading