title: pass function as parameter to dynamically created component blazor
body: <p>I am trying to pass some parameters to a dynamically generated component</p>
  
  <p><strong>Parent</strong></p>
  
  <pre><code>...
      DynamicComponent = builder =&gt;
          {
              Type moduleType = Type.GetType(ChildComponentName);
              System.Diagnostics.Debug.WriteLine(moduleType);
              if (moduleType != null)
              {
                  builder.OpenComponent(0, moduleType);
                  builder.AddAttribute(1, "title", "Delete + " + item.Name + "?");
                  builder.AddAttribute(2, "content", "Are you sure you want to delete this organization?");
                  builder.AddAttribute(3, "YesCallback", whatgoeshere?);
                  builder.AddComponentReferenceCapture(1, inst =&gt; { child = Convert.ChangeType(inst, moduleType); });
                  builder.CloseComponent();
              }
          };
  
      public void Delete(string msg)
          {
              System.Diagnostics.Debug.WriteLine(msg);
              items.RemoveAt(DeleteIndex);
          }
  ...
  </code></pre>
  
  <p><strong>Child</strong></p>
  
  <pre><code>...
      [Parameter] public string Title { get; set; }
      [Parameter] public string Content { get; set; }
      [Parameter] public EventCallback&lt;string&gt; YesCallback { get; set; }
  ...
  </code></pre>
  
  <p>The component get's generated and displayed fine. The first two parameter are set fine. What I can't figure out is how to pass the parent <code>Delete</code> function as third attribute so the child can call it.</p>