diff --git a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml index e7244066a267..691a329347f7 100644 --- a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml +++ b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml @@ -7,9 +7,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - void IncrementCount() + private void IncrementCount() { currentCount++; } diff --git a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml index d8c824a3d37a..bf5adca257fb 100644 --- a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml +++ b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml @@ -1,9 +1,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - [Parameter] int IncrementAmount { get; set; } = 1; + [Parameter] private int IncrementAmount { get; set; } = 1; - void IncrementCount() + private void IncrementCount() { currentCount += IncrementAmount; } diff --git a/aspnetcore/client-side/spa/blazor/index.md b/aspnetcore/client-side/spa/blazor/index.md index f8050c784aea..927df3c8cc70 100644 --- a/aspnetcore/client-side/spa/blazor/index.md +++ b/aspnetcore/client-side/spa/blazor/index.md @@ -5,7 +5,7 @@ description: Explore ASP.NET Core Blazor, a new way to build interactive client- monikerRange: '>= aspnetcore-3.0' ms.author: riande ms.custom: mvc -ms.date: 03/28/2019 +ms.date: 04/08/2019 uid: spa/blazor/index --- # Introduction to Blazor @@ -66,7 +66,7 @@ The following markup is an example of a custom dialog component in a Razor file

@Title

@BodyContent - +
@functions { diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml index 8a6b658b825a..5d1e16e32e86 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml @@ -8,6 +8,6 @@ @functions { - [Parameter] RenderFragment ItemTemplate { get; set; } - [Parameter] IReadOnlyList Items { get; set; } + [Parameter] private RenderFragment ItemTemplate { get; set; } + [Parameter] private IReadOnlyList Items { get; set; } } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml index 4ac4d17fe521..9bdbd87f2add 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml @@ -3,17 +3,17 @@ @implements ITab
  • - + @Title
  • @functions { - [CascadingParameter] TabSet ContainerTabSet { get; set; } - [Parameter] string Title { get; set; } + [CascadingParameter] private TabSet ContainerTabSet { get; set; } + [Parameter] private string Title { get; set; } [Parameter] public RenderFragment ChildContent { get; private set; } - string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; + private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; protected override void OnInit() { @@ -25,7 +25,7 @@ ContainerTabSet.RemoveTab(this); } - void Activate() + private void Activate() { ContainerTabSet.SetActivateTab(this); } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml index bf03bcb440af..4b0d14dbc29a 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml @@ -13,7 +13,7 @@ @functions { - [Parameter] RenderFragment ChildContent { get; set; } + [Parameter] private RenderFragment ChildContent { get; set; } public ITab ActiveTab { get; private set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml index 68c6e2c85388..b7393be16699 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml @@ -16,8 +16,8 @@ @functions { - [Parameter] RenderFragment TableHeader { get; set; } - [Parameter] RenderFragment RowTemplate { get; set; } - [Parameter] RenderFragment TableFooter { get; set; } - [Parameter] IReadOnlyList Items { get; set; } + [Parameter] private RenderFragment TableHeader { get; set; } + [Parameter] private RenderFragment RowTemplate { get; set; } + [Parameter] private RenderFragment TableFooter { get; set; } + [Parameter] private IReadOnlyList Items { get; set; } } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs index 64b56fe344b0..d746dc9395d4 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs @@ -2,5 +2,6 @@ public class BlazorRocksBase : ComponentBase { - public string BlazorRocksText { get; set; } = "Blazor rocks the browser!"; + public string BlazorRocksText { get; set; } = + "Blazor rocks the browser!"; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml index 1957f7d52af8..b753fd0e84fa 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml @@ -8,7 +8,7 @@

    Greetings from the first tab!

    @@ -49,7 +49,7 @@ namespace BlazorSample.UIInterfaces <h4>Greetings from the first tab!</h4> <label> - <input type="checkbox" bind=@@showThirdTab /> + <input type="checkbox" bind="@@showThirdTab" /> Toggle third tab </label> </Tab> @@ -68,7 +68,7 @@ namespace BlazorSample.UIInterfaces @@functions { - bool showThirdTab; + private bool showThirdTab; }

    TabSet.csthml

    @@ -90,7 +90,7 @@ namespace BlazorSample.UIInterfaces </div> @@functions { - [Parameter] RenderFragment ChildContent { get; set; } + [Parameter] private RenderFragment ChildContent { get; set; } public ITab ActiveTab { get; private set; } @@ -129,17 +129,17 @@ namespace BlazorSample.UIInterfaces @@implements ITab <li> - <a onclick=@@Activate class="nav-link @@TitleCssClass" role="button"> + <a onclick="@@Activate" class="nav-link @@TitleCssClass" role="button"> @@Title </a> </li> @@functions { - [CascadingParameter] TabSet ContainerTabSet { get; set; } - [Parameter] string Title { get; set; } + [CascadingParameter] private TabSet ContainerTabSet { get; set; } + [Parameter] private string Title { get; set; } [Parameter] public RenderFragment ChildContent { get; private set; } - string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; + private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; protected override void OnInit() { @@ -151,7 +151,7 @@ namespace BlazorSample.UIInterfaces ContainerTabSet.RemoveTab(this); } - void Activate() + private void Activate() { ContainerTabSet.SetActivateTab(this); } @@ -159,5 +159,5 @@ namespace BlazorSample.UIInterfaces @functions { -bool showThirdTab; + private bool showThirdTab; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml index c00a424e8265..020de77a2e83 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml @@ -11,11 +11,11 @@

    @functions { - int currentCount = 0; + private int currentCount = 0; [CascadingParameter] protected ThemeInfo ThemeInfo { get; set; } - void IncrementCount() + private void IncrementCount() { currentCount++; } @@ -39,7 +39,7 @@ </div> @@functions { - ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; + private ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; }

    This component (CascadingValuesParametersTheme.cshtml) receives the ThemeInfo as a CascadingParameter. The parameter is used to style one of the buttons:

    @@ -49,11 +49,11 @@ <button class="btn @@ThemeInfo.ButtonClass" onclick="@@IncrementCount">Increment Counter (Themed)</button> @@functions { - int currentCount = 0; + private int currentCount = 0; [CascadingParameter] protected ThemeInfo ThemeInfo { get; set; } - void IncrementCount() + private void IncrementCount() { currentCount++; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml index d21318cfe03f..3aaab449f1f7 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml @@ -15,7 +15,7 @@

    @_headingText

    -
    +
    @* A check box sets the font style and is bound to the _italicsCheck field. diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/RazorTemplates.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/RazorTemplates.cshtml index 5785025e2ade..bb849b552a18 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/RazorTemplates.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/RazorTemplates.cshtml @@ -26,7 +26,7 @@ @petTemplate(new Pet { Name = "Rex" }) @functions { - List pets = new List + private List pets = new List { new Pet { PetId = 1, Name = "Rin Tin Tin" }, new Pet { PetId = 2, Name = "Mr. Bigglesworth" }, @@ -37,7 +37,7 @@ new Pet { PetId = 7, Name = "K-9" } }; - class Pet + private class Pet { public int PetId { get; set; } public string Name { get; set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/TemplatedComponents.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/TemplatedComponents.cshtml index 6c92b76d808c..29bcfe6a80ee 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/TemplatedComponents.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/TemplatedComponents.cshtml @@ -94,7 +94,7 @@ @functions { - List pets = new List + private List pets = new List { new Pet { PetId = 1, Name = "Rin Tin Tin" }, new Pet { PetId = 2, Name = "Mr. Bigglesworth" }, @@ -105,7 +105,7 @@ new Pet { PetId = 7, Name = "K-9" } }; - class Pet + private class Pet { public int PetId { get; set; } public string Name { get; set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/CascadingValuesParametersLayout.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/CascadingValuesParametersLayout.cshtml index 40680aca42cf..0d57705ce2bd 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/CascadingValuesParametersLayout.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/CascadingValuesParametersLayout.cshtml @@ -14,5 +14,6 @@
    @functions { - ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; + private ThemeInfo theme = + new ThemeInfo { ButtonClass = "btn-success" }; } diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/NavMenu.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/NavMenu.cshtml index d93bf1386dfa..13ed562052e7 100644 --- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/NavMenu.cshtml +++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Shared/NavMenu.cshtml @@ -68,11 +68,11 @@
    @functions { - bool collapseNavMenu = true; + private bool collapseNavMenu = true; - string NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; - void ToggleNavMenu() + private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/ListViewTemplate.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/ListViewTemplate.razor index 8a6b658b825a..5d1e16e32e86 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/ListViewTemplate.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/ListViewTemplate.razor @@ -8,6 +8,6 @@ @functions { - [Parameter] RenderFragment ItemTemplate { get; set; } - [Parameter] IReadOnlyList Items { get; set; } + [Parameter] private RenderFragment ItemTemplate { get; set; } + [Parameter] private IReadOnlyList Items { get; set; } } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/BlazorRocksBase.cs b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/BlazorRocksBase.cs index 64b56fe344b0..d746dc9395d4 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/BlazorRocksBase.cs +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/BlazorRocksBase.cs @@ -2,5 +2,6 @@ public class BlazorRocksBase : ComponentBase { - public string BlazorRocksText { get; set; } = "Blazor rocks the browser!"; + public string BlazorRocksText { get; set; } = + "Blazor rocks the browser!"; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTabSet.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTabSet.razor index 810a1a989600..bb71f14f831e 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTabSet.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTabSet.razor @@ -8,7 +8,7 @@

    Greetings from the first tab!

    @@ -49,7 +49,7 @@ namespace RazorComponents.UIInterfaces <h4>Greetings from the first tab!</h4> <label> - <input type="checkbox" bind=@@showThirdTab /> + <input type="checkbox" bind="@@showThirdTab" /> Toggle third tab </label> </Tab> @@ -90,7 +90,7 @@ namespace RazorComponents.UIInterfaces </div> @@functions { - [Parameter] RenderFragment ChildContent { get; set; } + [Parameter] private RenderFragment ChildContent { get; set; } public ITab ActiveTab { get; private set; } @@ -129,17 +129,17 @@ namespace RazorComponents.UIInterfaces @@implements ITab <li> - <a onclick=@@Activate class="nav-link @@TitleCssClass" role="button"> + <a onclick="@@Activate" class="nav-link @@TitleCssClass" role="button"> @@Title </a> </li> @@functions { - [CascadingParameter] TabSet ContainerTabSet { get; set; } - [Parameter] string Title { get; set; } + [CascadingParameter] private TabSet ContainerTabSet { get; set; } + [Parameter] private string Title { get; set; } [Parameter] public RenderFragment ChildContent { get; private set; } - string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; + private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; protected override void OnInit() { @@ -151,7 +151,7 @@ namespace RazorComponents.UIInterfaces ContainerTabSet.RemoveTab(this); } - void Activate() + private void Activate() { ContainerTabSet.SetActivateTab(this); } @@ -159,5 +159,5 @@ namespace RazorComponents.UIInterfaces @functions { -bool showThirdTab; + private bool showThirdTab; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTheme.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTheme.razor index d7cb4fc222cf..ae5bbb65b74b 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTheme.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/CascadingValuesParametersTheme.razor @@ -11,11 +11,11 @@

    @functions { - int currentCount = 0; + private int currentCount = 0; [CascadingParameter] protected ThemeInfo ThemeInfo { get; set; } - void IncrementCount() + private void IncrementCount() { currentCount++; } @@ -39,7 +39,7 @@ </div> @@functions { - ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; + private ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; }

    This component (CascadingValuesParametersTheme) receives the ThemeInfo as a CascadingParameter. The parameter is used to style one of the buttons:

    @@ -49,11 +49,11 @@ <button class="btn @@ThemeInfo.ButtonClass" onclick="@@IncrementCount">Increment Counter (Themed)</button> @@functions { - int currentCount = 0; + private int currentCount = 0; [CascadingParameter] protected ThemeInfo ThemeInfo { get; set; } - void IncrementCount() + private void IncrementCount() { currentCount++; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/HeadingComponent.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/HeadingComponent.razor index d21318cfe03f..3aaab449f1f7 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/HeadingComponent.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/HeadingComponent.razor @@ -15,7 +15,7 @@

    @_headingText

    -
    +
    @* A check box sets the font style and is bound to the _italicsCheck field. diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/RazorTemplates.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/RazorTemplates.razor index 5785025e2ade..bb849b552a18 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/RazorTemplates.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/RazorTemplates.razor @@ -26,7 +26,7 @@ @petTemplate(new Pet { Name = "Rex" }) @functions { - List pets = new List + private List pets = new List { new Pet { PetId = 1, Name = "Rin Tin Tin" }, new Pet { PetId = 2, Name = "Mr. Bigglesworth" }, @@ -37,7 +37,7 @@ new Pet { PetId = 7, Name = "K-9" } }; - class Pet + private class Pet { public int PetId { get; set; } public string Name { get; set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/TemplatedComponents.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/TemplatedComponents.razor index eac26fa7f175..6fde1b176102 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/TemplatedComponents.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Pages/TemplatedComponents.razor @@ -94,7 +94,7 @@ @functions { - List pets = new List + private List pets = new List { new Pet { PetId = 1, Name = "Rin Tin Tin" }, new Pet { PetId = 2, Name = "Mr. Bigglesworth" }, @@ -105,7 +105,7 @@ new Pet { PetId = 7, Name = "K-9" } }; - class Pet + private class Pet { public int PetId { get; set; } public string Name { get; set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/CascadingValuesParametersLayout.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/CascadingValuesParametersLayout.razor index d86420eb084a..0a854e070731 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/CascadingValuesParametersLayout.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/CascadingValuesParametersLayout.razor @@ -14,5 +14,6 @@
    @functions { - ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; + private ThemeInfo theme = + new ThemeInfo { ButtonClass = "btn-success" }; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor index 4dd6807b00d6..8e40c025d943 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor @@ -5,6 +5,7 @@
    +
    @functions { - bool collapseNavMenu = true; + private bool collapseNavMenu = true; - string NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; - void ToggleNavMenu() + private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Tab.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Tab.razor index 680a17ff359f..546ea0163d49 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Tab.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/Tab.razor @@ -3,17 +3,17 @@ @implements ITab
  • - + @Title
  • @functions { - [CascadingParameter] TabSet ContainerTabSet { get; set; } - [Parameter] string Title { get; set; } + [CascadingParameter] private TabSet ContainerTabSet { get; set; } + [Parameter] private string Title { get; set; } [Parameter] public RenderFragment ChildContent { get; private set; } - string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; + private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null; protected override void OnInit() { @@ -25,7 +25,7 @@ ContainerTabSet.RemoveTab(this); } - void Activate() + private void Activate() { ContainerTabSet.SetActivateTab(this); } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TabSet.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TabSet.razor index 6c08a429178e..b0954e92940a 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TabSet.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TabSet.razor @@ -13,7 +13,7 @@ @functions { - [Parameter] RenderFragment ChildContent { get; set; } + [Parameter] private RenderFragment ChildContent { get; set; } public ITab ActiveTab { get; private set; } diff --git a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TableTemplate.razor b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TableTemplate.razor index 68c6e2c85388..b7393be16699 100644 --- a/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TableTemplate.razor +++ b/aspnetcore/razor-components/common/samples/3.x/RazorComponents/Components/TableTemplate.razor @@ -16,8 +16,8 @@ @functions { - [Parameter] RenderFragment TableHeader { get; set; } - [Parameter] RenderFragment RowTemplate { get; set; } - [Parameter] RenderFragment TableFooter { get; set; } - [Parameter] IReadOnlyList Items { get; set; } + [Parameter] private RenderFragment TableHeader { get; set; } + [Parameter] private RenderFragment RowTemplate { get; set; } + [Parameter] private RenderFragment TableFooter { get; set; } + [Parameter] private IReadOnlyList Items { get; set; } } diff --git a/aspnetcore/razor-components/components.md b/aspnetcore/razor-components/components.md index 6e582a53dda0..b9f8ec298c51 100644 --- a/aspnetcore/razor-components/components.md +++ b/aspnetcore/razor-components/components.md @@ -5,7 +5,7 @@ description: Learn how to create and use Razor Components, including how to bind monikerRange: '>= aspnetcore-3.0' ms.author: riande ms.custom: mvc -ms.date: 04/07/2019 +ms.date: 04/08/2019 uid: razor-components/components --- # Create and use Razor Components @@ -174,7 +174,7 @@ Parent component: [Parameter] private int ParentYear { get; set; } = 1978; - void ChangeTheYear() + private void ChangeTheYear() { ParentYear = 1986; } @@ -243,7 +243,7 @@ The following code calls the `UpdateHeading` method when the button is selected @functions { - void UpdateHeading(UIMouseEventArgs e) + private void UpdateHeading(UIMouseEventArgs e) { ... } @@ -256,7 +256,7 @@ The following code calls the `CheckboxChanged` method when the check box is chan @functions { - void CheckboxChanged() + private void CheckboxChanged() { ... } @@ -271,7 +271,7 @@ Event handlers can also be asynchronous and return a @functions { - async Task UpdateHeading(UIMouseEventArgs e) + private async Task UpdateHeading(UIMouseEventArgs e) { ... } @@ -309,9 +309,9 @@ It's often convenient to close over additional values, such as when iterating ov } @functions { - string message = "Select a button to learn its position."; + private string message = "Select a button to learn its position."; - void UpdateHeading(UIMouseEventArgs e, int buttonNumber) + private void UpdateHeading(UIMouseEventArgs e, int buttonNumber) { message = $"You selected Button #{buttonNumber} at " + "mouse position: {e.ClientX} X {e.ClientY}."; @@ -330,9 +330,9 @@ Component references provide a way get a reference to a component instance so th @functions { - MyLoginDialog loginDialog; + private MyLoginDialog loginDialog; - void OnSomething() + private void OnSomething() { loginDialog.Show(); } @@ -540,7 +540,8 @@ The following example shows using the `MarkupString` type to add a block of stat @((MarkupString)myMarkup) @functions { - string myMarkup = "

    This is a markup string.

    "; + private string myMarkup = + "

    This is a markup string.

    "; } ``` @@ -677,7 +678,7 @@ For example, the sample app specifies theme information (`ThemeInfo`) in one of @functions { - ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; + private ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" }; } ``` @@ -686,7 +687,8 @@ To make use of cascading values, components declare cascading parameters using t ```cshtml ... -[CascadingParameter(Name = "UserPermissions")] PermInfo Permissions { get; set; } +[CascadingParameter(Name = "UserPermissions")] +private PermInfo Permissions { get; set; } ``` Binding with a string name value is relevant if you have multiple cascading values of the same type and need to differentiate them within the same subtree. @@ -719,11 +721,11 @@ In the sample app, the Cascading Values Parameters Theme component binds to the

    @functions { - int currentCount = 0; + private int currentCount = 0; [CascadingParameter] protected ThemeInfo ThemeInfo { get; set; } - void IncrementCount() + private void IncrementCount() { currentCount++; } @@ -826,9 +828,9 @@ Built component (*BuiltContent.razor* in Razor Components; *BuiltContent.cshtml* @functions { - RenderFragment CustomRender { get; set; } + private RenderFragment CustomRender { get; set; } - RenderFragment CreateComponent() => builder => + private RenderFragment CreateComponent() => builder => { for (var i = 0; i < 3; i++) { @@ -838,7 +840,7 @@ Built component (*BuiltContent.razor* in Razor Components; *BuiltContent.cshtml* } }; - void RenderComponent() + private void RenderComponent() { CustomRender = CreateComponent(); } diff --git a/aspnetcore/razor-components/forms-validation.md b/aspnetcore/razor-components/forms-validation.md index 039700d05575..ad61d476180b 100644 --- a/aspnetcore/razor-components/forms-validation.md +++ b/aspnetcore/razor-components/forms-validation.md @@ -5,7 +5,7 @@ description: Learn how to use forms and field validation scenarios in Razor Comp monikerRange: '>= aspnetcore-3.0' ms.author: riande ms.custom: mvc -ms.date: 04/01/2019 +ms.date: 04/08/2019 uid: razor-components/forms-validation --- # Razor Components forms and validation @@ -45,7 +45,7 @@ A form is defined using the `` component. The following form demonstra @functions { private ExampleModel exampleModel = new ExampleModel(); - void HandleValidSubmit() + private void HandleValidSubmit() { Console.WriteLine("OnValidSubmit"); } @@ -158,7 +158,7 @@ The following form validates user input using the validation defined in the `Sta @functions { private Starship starship = new Starship(); - void HandleValidSubmit() + private void HandleValidSubmit() { Console.WriteLine("OnValidSubmit"); } diff --git a/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter1.razor b/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter1.razor index e7244066a267..691a329347f7 100644 --- a/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter1.razor +++ b/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter1.razor @@ -7,9 +7,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - void IncrementCount() + private void IncrementCount() { currentCount++; } diff --git a/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter2.razor b/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter2.razor index d8c824a3d37a..bf5adca257fb 100644 --- a/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter2.razor +++ b/aspnetcore/razor-components/get-started/samples_snapshot/3.x/Counter2.razor @@ -1,9 +1,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - [Parameter] int IncrementAmount { get; set; } = 1; + [Parameter] private int IncrementAmount { get; set; } = 1; - void IncrementCount() + private void IncrementCount() { currentCount += IncrementAmount; } diff --git a/aspnetcore/razor-components/index.md b/aspnetcore/razor-components/index.md index 6130ab65f9b4..06911908b097 100644 --- a/aspnetcore/razor-components/index.md +++ b/aspnetcore/razor-components/index.md @@ -5,7 +5,7 @@ description: Explore ASP.NET Core Razor Components, a way to build interactive c monikerRange: '>= aspnetcore-3.0' ms.author: riande ms.custom: seoapril2019 -ms.date: 03/27/2019 +ms.date: 04/08/2019 uid: razor-components/index --- # Introduction to Razor Components @@ -58,7 +58,7 @@ The following markup is an example of a custom dialog component in a Razor file

    @Title

    @BodyContent - +
    @functions { diff --git a/aspnetcore/razor-components/javascript-interop.md b/aspnetcore/razor-components/javascript-interop.md index 7e6bf172d9f4..8f6d33548c76 100644 --- a/aspnetcore/razor-components/javascript-interop.md +++ b/aspnetcore/razor-components/javascript-interop.md @@ -5,7 +5,7 @@ description: Learn how to invoke JavaScript functions from .NET and .NET methods monikerRange: '>= aspnetcore-3.0' ms.author: riande ms.custom: mvc -ms.date: 04/06/2019 +ms.date: 04/08/2019 uid: razor-components/javascript-interop --- # Razor Components JavaScript interop @@ -84,7 +84,7 @@ The following component: 105, 118, 101, 114, 115, 101, 10, 10, }; - async void ConvertArray() + private async void ConvertArray() { var text = await JsRuntime.InvokeAsync("ConvertArray", QuoteArray); diff --git a/aspnetcore/razor-components/javascript-interop/samples_snapshot/component1.cshtml b/aspnetcore/razor-components/javascript-interop/samples_snapshot/component1.cshtml index 274b0aa4c6b8..e63baff624c1 100644 --- a/aspnetcore/razor-components/javascript-interop/samples_snapshot/component1.cshtml +++ b/aspnetcore/razor-components/javascript-interop/samples_snapshot/component1.cshtml @@ -4,7 +4,7 @@ @functions { - ElementRef username; + private ElementRef username; public async void SetFocus() { diff --git a/aspnetcore/razor-components/javascript-interop/samples_snapshot/component2.cshtml b/aspnetcore/razor-components/javascript-interop/samples_snapshot/component2.cshtml index b5022ecf53ff..5b654be5e7ec 100644 --- a/aspnetcore/razor-components/javascript-interop/samples_snapshot/component2.cshtml +++ b/aspnetcore/razor-components/javascript-interop/samples_snapshot/component2.cshtml @@ -5,7 +5,7 @@ @functions { - ElementRef username; + private ElementRef username; public async Task SetFocus() { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/Counter.cshtml b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/Counter.cshtml index add04af3265d..b4d439e842a0 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/Counter.cshtml +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/Counter.cshtml @@ -7,11 +7,11 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - [Parameter] int IncrementAmount { get; set; } = 1; + [Parameter] private int IncrementAmount { get; set; } = 1; - void IncrementCount() + private void IncrementCount() { currentCount += IncrementAmount; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/FetchData.cshtml b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/FetchData.cshtml index 3f5b9a9e4958..95b3ebf37e7c 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/FetchData.cshtml +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/FetchData.cshtml @@ -35,14 +35,14 @@ else } @functions { - WeatherForecast[] forecasts; + private WeatherForecast[] forecasts; protected override async Task OnInitAsync() { forecasts = await Http.GetJsonAsync("sample-data/weather.json"); } - class WeatherForecast + private class WeatherForecast { public DateTime Date { get; set; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/ToDo.cshtml b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/ToDo.cshtml index 5833e59e20af..611c649d180a 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/ToDo.cshtml +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Pages/ToDo.cshtml @@ -16,10 +16,10 @@ @functions { - IList todos = new List(); - string newTodo; + private IList todos = new List(); + private string newTodo; - void AddTodo() + private void AddTodo() { if (!string.IsNullOrWhiteSpace(newTodo)) { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/NavMenu.cshtml b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/NavMenu.cshtml index a7f1c3748b0e..06d70da73023 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/NavMenu.cshtml +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/NavMenu.cshtml @@ -31,11 +31,11 @@ @functions { - bool collapseNavMenu = true; + private bool collapseNavMenu = true; - string NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; - void ToggleNavMenu() + private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/SurveyPrompt.cshtml b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/SurveyPrompt.cshtml index e534ca64fc82..ec47614afa03 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/SurveyPrompt.cshtml +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/Blazor/Shared/SurveyPrompt.cshtml @@ -11,5 +11,5 @@ @functions { // Demonstrates how a parent component can supply parameters - [Parameter] string Title { get; set; } + [Parameter] private string Title { get; set; } } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/Counter.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/Counter.razor index f4124adc5ab6..73b06b045ffb 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/Counter.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/Counter.razor @@ -7,11 +7,11 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - [Parameter] int IncrementAmount { get; set; } = 1; + [Parameter] private int IncrementAmount { get; set; } = 1; - void IncrementCount() + private void IncrementCount() { currentCount += IncrementAmount; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/FetchData.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/FetchData.razor index 22405e86c116..98c2e79b97e4 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/FetchData.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/FetchData.razor @@ -36,7 +36,7 @@ else } @functions { - WeatherForecast[] forecasts; + private WeatherForecast[] forecasts; protected override async Task OnInitAsync() { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/ToDo.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/ToDo.razor index 657ad5e441c8..ecfca0dcd8ad 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/ToDo.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Pages/ToDo.razor @@ -16,10 +16,10 @@ @functions { - IList todos = new List(); - string newTodo; + private IList todos = new List(); + private string newTodo; - void AddTodo() + private void AddTodo() { if (!string.IsNullOrWhiteSpace(newTodo)) { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor index c67a142aa285..842d5ea53beb 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples/3.x/RazorComponents/Components/Shared/NavMenu.razor @@ -31,11 +31,11 @@ @functions { - bool collapseNavMenu = true; + private bool collapseNavMenu = true; - string NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; - void ToggleNavMenu() + private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter1.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter1.razor index 973af92354b3..875a52b4cdd7 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter1.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter1.razor @@ -7,9 +7,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - void IncrementCount() + private void IncrementCount() { currentCount++; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter2.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter2.razor index c1ed060c4682..e9c581250907 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter2.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Counter2.razor @@ -7,9 +7,9 @@ @functions { - int currentCount = 0; + private int currentCount = 0; - void IncrementCount() + private void IncrementCount() { currentCount += 2; } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/FetchData2.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/FetchData2.razor index b2d5476232aa..fa6b5e2d8e7b 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/FetchData2.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/FetchData2.razor @@ -1,5 +1,5 @@ @functions { - WeatherForecast[] forecasts; + private WeatherForecast[] forecasts; protected override async Task OnInitAsync() { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo5.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo5.razor index 1ebd0fd32166..33ebf997f374 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo5.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo5.razor @@ -13,5 +13,5 @@ @functions { - IList todos = new List(); + private IList todos = new List(); } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo6.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo6.razor index 150826c44a3e..3d01ef59d7e2 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo6.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo6.razor @@ -2,9 +2,9 @@ @functions { - IList todos = new List(); + private IList todos = new List(); - void AddTodo() + private void AddTodo() { // Todo: Add the todo } diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo7.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo7.razor index a115eda17624..3848d66b21ca 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo7.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo7.razor @@ -1,2 +1,2 @@ -IList todos = new List(); -string newTodo; +private IList todos = new List(); +private string newTodo; diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo8.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo8.razor index c1a316c3a702..bb836f3debfb 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo8.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/ToDo8.razor @@ -13,10 +13,10 @@ @functions { - IList todos = new List(); - string newTodo; + private IList todos = new List(); + private string newTodo; - void AddTodo() + private void AddTodo() { if (!string.IsNullOrWhiteSpace(newTodo)) { diff --git a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Todo4.razor b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Todo4.razor index 45c82a03feb7..88ce5ee4e80a 100644 --- a/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Todo4.razor +++ b/aspnetcore/tutorials/build-your-first-razor-components-app/samples_snapshot/3.x/Todo4.razor @@ -10,5 +10,5 @@ @functions { - IList todos = new List(); + private IList todos = new List(); }