INNER CODE UNIT · C#
noConstructors
axmolengine/axmol · tools/bindings-generator/src/BindingGenerator.cs:667
var noConstructors = request.NoConstructorPatterns.Any(pattern =>
MatchesConfiguredPattern(nativeName, pattern));
var children = GetChildren(tree, record);
// Protected destructors are common on ref-counted Axmol types such as
// Material. They remain valid non-owning userdata, but Lua must not
// construct an instance whose lifetime it cannot end.
var constructors = isAbstract || noConstructors || !HasBindableDestructor(record, tree)
? Array.Empty<BindingConstructor>()
: children
.Where(x => x.Kind == CXCursorKind.CXCursor_Constructor)
.Where(IsUsableConstructor)
.Where(x => IsSupportedSignature(x, tree))
.Select(x => ToBindingConstructor(x, tree, qualifiedName))
.GroupBy(x => string.Join(",", x.ParameterTypes), StringComparer.Ordinal)
.Select(x => x.First())
.ToArray();