Пример #1
0
 // There has to be some default content. If we render blank by default, developers
 // will find it hard to guess why their UI isn't appearing.
 private static RenderFragment DefaultNotAuthorizedContent(AuthenticationState authenticationState)
 => builder => builder.AddContent(0, "Not authorized");
Пример #2
0
        private void RenderNotAuthorizedInDefaultLayout(RenderTreeBuilder builder, AuthenticationState authenticationState)
        {
            var content = NotAuthorized ?? _defaultNotAuthorizedContent;

            RenderContentInDefaultLayout(builder, content(authenticationState));
        }