private Func<DisplayContext, IHtmlString> CreateDelegate( ShapeAttributeOccurrence attributeOccurrence, ShapeDescriptor descriptor) { return context => { var serviceInstance = _componentContext.Resolve(attributeOccurrence.Registration, Enumerable.Empty<Parameter>()); // oversimplification for the sake of evolving return PerformInvoke(context, attributeOccurrence.MethodInfo, serviceInstance); }; }
private Func <DisplayContext, IHtmlString> CreateDelegate( ShapeAttributeOccurrence attributeOccurrence, ShapeDescriptor descriptor) { return(context => { var serviceInstance = _componentContext.ResolveComponent(attributeOccurrence.Registration, Enumerable.Empty <Parameter>()); // oversimplification for the sake of evolving return PerformInvoke(context, attributeOccurrence.MethodInfo, serviceInstance); }); }
private Func<DisplayContext, Task<IHtmlContent>> CreateDelegate( ShapeAttributeOccurrence attributeOccurrence, ShapeDescriptor descriptor) { return context => { var serviceInstance = _componentContext.GetService(attributeOccurrence.ServiceType); // oversimplification for the sake of evolving return PerformInvokeAsync(context, attributeOccurrence.MethodInfo, serviceInstance); }; }
private Func <DisplayContext, Task <IHtmlContent> > CreateDelegate( ShapeAttributeOccurrence attributeOccurrence, ShapeDescriptor descriptor) { return(context => { var serviceInstance = context.ServiceProvider.GetService(attributeOccurrence.ServiceType); // oversimplification for the sake of evolving return PerformInvokeAsync(context, attributeOccurrence.MethodInfo, serviceInstance); }); }