protected virtual void GenerateInvoker(HierarchyInterface iface) { if (iface.Invoker != null) { Logger.Verbose($"Interface {iface.Name} already has an invoker class attached"); return; } var parent = iface.Parent as HierarchyElement; if (parent == null) { throw new InvalidOperationException($"Invoker requires that its associated interface ({iface.FullName}) is a child of HierarchyElement"); } var invoker = new HierarchyInterfaceInvoker(Context, iface.Parent as HierarchyElement, iface) { Visibility = ApiVisibility.Internal }; invoker.Init(); invoker.AddBaseType(Hierarchy.DefaultClassBaseType); invoker.AddImplements(iface.FullName); parent.AddMember(invoker); iface.Invoker = invoker; // SynthesizeElements is ran after managed names are already generated, so we need to make sure // our invoker has them generated as well here invoker.SetManagedNames(); }
protected override InterfaceCodeGenerator GetInterfaceGenerator(HierarchyInterface iface) { throw new NotImplementedException(); }
public override void AddMember(HierarchyInterface iface) { }