public void ConnectSubclass(InheritanceNode node) { node.BaseClass = this; DerivedClasses.Add(node); if (node.ClassID.HasValue) { DerivedClassLookup.Add(node.ClassID.Value, node); } }
/// <summary> /// Function that should evaluate <see cref="Constructors"/> property. /// </summary> protected virtual IEnumerable <UserTypeConstructor> GetConstructors() { yield return(UserTypeConstructor.Static); if (!ExportOnlyStaticFields) { if (this is PhysicalUserType || DerivedClasses.OfType <PhysicalUserType>().Any() || DerivedClasses.Any(dc => dc.Constructors.Contains(UserTypeConstructor.SimplePhysical))) { yield return(UserTypeConstructor.RegularPhysical); yield return(UserTypeConstructor.ComplexPhysical); yield return(UserTypeConstructor.SimplePhysical); } else { yield return(UserTypeConstructor.Simple); } } }