/// <summary> /// Get context type for given element. /// </summary> /// <param name="el">Element which context type is resolved.</param> /// <returns>Fullname of context type.</returns> public static TypeDescriptor GetContextType(this CodeElement el) { if (el.IsTypeDefinition()) { return(descriptorFromFullName(el.FullName)); } else { return(el.ResolveType()); } }