コード例 #1
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            var parentConfig  = context.GetParentConfig();
            var parentFullKey = context.GetParentFullKey();

            if (!ValidateParentFullKey(parentFullKey))
            {
                return;
            }

            try {
                context.SetParentConfig(Config);
                context.SetParentFullKey(FullKey);
                await output.GetChildContentAsync();
            } finally {
                context.SetParentConfig(parentConfig);
                context.SetParentFullKey(parentFullKey);
            }

            if (parentConfig != null)
            {
                AppendConfig(parentConfig);
            }
        }