From f3cffa35c2384ab140ce8c0c875289975a8e1c26 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 11 May 2022 11:14:02 +0300 Subject: [PATCH] Remove namespace and usings since they're different between blazor server and wasm --- docs/en/UI/Blazor/Toolbars.md | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/en/UI/Blazor/Toolbars.md b/docs/en/UI/Blazor/Toolbars.md index b8cca6077a..3ff1b7f135 100644 --- a/docs/en/UI/Blazor/Toolbars.md +++ b/docs/en/UI/Blazor/Toolbars.md @@ -34,23 +34,16 @@ This sample simply shows a message. In real life, you probably want to call an H Now, we can create a class implementing the `IToolbarContributor` interface: ````csharp -using System.Threading.Tasks; -using MyCompanyName.MyProjectName.Blazor.Components; -using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Toolbars; - -namespace MyCompanyName.MyProjectName.Blazor +public class MyToolbarContributor : IToolbarContributor { - public class MyToolbarContributor : IToolbarContributor + public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) { - public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) + if (context.Toolbar.Name == StandardToolbars.Main) { - if (context.Toolbar.Name == StandardToolbars.Main) - { - context.Toolbar.Items.Insert(0, new ToolbarItem(typeof(Notification))); - } - - return Task.CompletedTask; + context.Toolbar.Items.Insert(0, new ToolbarItem(typeof(Notification))); } + + return Task.CompletedTask; } } ````