protected override TemplateDef CreateTemplateDefFromRenderingParametersDefs(RenderingDef rendering)
        {
            var result = base.CreateTemplateDefFromRenderingParametersDefs(rendering);

            result.Inherits = new[] { StandardRenderingParametersTemplate };

            return(result);
        }
        private static bool RequiresAntiForgeryToken(RenderingDef renderingDefinition)
        {
            var additionalData = renderingDefinition.AdditionalData;

            if (additionalData == null)
            {
                return(false);
            }

            if (!additionalData.ContainsKey("addAntiForgeryToken"))
            {
                return(false);
            }

            bool.TryParse(additionalData["addAntiForgeryToken"].ToString(), out var result);
            return(result);
        }