/// <summary> /// Get all base type expressions, including those of other parts if this is a partial type. /// </summary> /// <returns>The list of base type expressions, which might be either null or empty if there aren't any.</returns> public List <Expression> GetAllBaseTypes() { // Get the list of base types, building it if this is a partial type if (IsPartial) { List <Expression> baseTypes = new List <Expression>(); if (_baseTypes != null) { baseTypes.AddRange(_baseTypes); } foreach (TypeDecl otherPart in GetOtherParts()) { if (otherPart is BaseListTypeDecl) { BaseListTypeDecl baseListTypeDecl = (BaseListTypeDecl)otherPart; if (baseListTypeDecl.HasBaseTypes) { baseTypes.AddRange(baseListTypeDecl.BaseTypes); } } } return(baseTypes); } return(_baseTypes); }
/// <summary> /// Deep-clone the code object. /// </summary> public override CodeObject Clone() { BaseListTypeDecl clone = (BaseListTypeDecl)base.Clone(); clone._baseTypes = ChildListHelpers.Clone(_baseTypes, clone); return(clone); }