private Func<DisplayContext, IHtmlString> CreateDelegate(
            ShapeAttributeOccurrence attributeOccurrence)
        {
            return context =>
            {
                var serviceInstance = _componentContext.ResolveComponent(attributeOccurrence.Registration, Enumerable.Empty<Parameter>());

                return PerformInvoke(context, attributeOccurrence.MethodInfo, serviceInstance);
            };
        }