/// <summary> /// Obtains the name of the base type this class implements. /// </summary> /// <returns>The base class for the type.</returns> public Signatures.TypeDetails GetBaseClass() { #if DEBUG if (_type.InheritsFrom == null) { System.Diagnostics.Debug.WriteLine($"class {_type.Name} has a null base type."); return(null); } #endif if (this._type.InheritsFrom is TypeSpec) { return(((TypeSpec)_type.InheritsFrom).TypeDetails); } else { Signatures.TypeDetails details = new Signatures.TypeDetails(); details.Type = _type.InheritsFrom; return(details); } }
/// <summary> /// Obtains the names of all the interfaces this class implements. /// </summary> /// <returns>An array of strings identifying the interfaces.</returns> public Signatures.TypeDetails[] GetInterfaces() { int implentationCount = _type.Implements.Count; Signatures.TypeDetails[] interfaces = new Signatures.TypeDetails[implentationCount]; for (int i = 0; i < implentationCount; i++) { if (_type.Implements[i] is TypeSpec) { interfaces[i] = ((TypeSpec)_type.Implements[i]).TypeDetails; } else { Signatures.TypeDetails details = new Signatures.TypeDetails(); details.Type = _type.Implements[i]; interfaces[i] = details; } } return(interfaces); }
/// <summary> /// Initialises a new instance of the ParameterDetails class. /// </summary> /// <param name="parameter">The details of the parameter.</param> /// <param name="details">The details of the type for the parameter.</param> public ParameterDetails(ParamDef parameter, Signatures.TypeDetails details) { TypeDetails = details; _parameter = parameter; }