/// <summary> /// Gets the type namespace /// </summary> /// <param name="extractedType"></param> /// <returns></returns> public string GetPrefix(ExtractedTypeDescriptor extractedType) { if (_imports.ContainsImportPath(extractedType.TargetPath)) { return(_imports.GetImportAtPath(extractedType.TargetPath).ImportAlias); } return(""); }
/// <summary> /// Gets the type namespace /// </summary> /// <param name="extractedType"></param> /// <returns></returns> protected override string GetTypeNamespace(ExtractedTypeDescriptor extractedType) { if (extractedType is ExtractedEnumTypeDescriptor enumType) { return(_enumPrefix); } return(_typePrefix); }
/// <summary> /// Gets the namespace with the trailing dot for the given type /// </summary> /// <param name="typeDescriptor"></param> /// <returns></returns> private string GetNamespaceWithDot(ExtractedTypeDescriptor typeDescriptor) { string typeNs = GetTypeNamespace(typeDescriptor); if (!string.IsNullOrEmpty(typeNs)) { typeNs += "."; } return(typeNs); }
/// <summary> /// Gets the namespace (or prefix) of the given type /// </summary> /// <param name="typeDescriptor">The type descriptor</param> /// <returns>The namespace or prefix, or null if not applicable</returns> protected virtual string GetTypeNamespace(ExtractedTypeDescriptor typeDescriptor) { return(_resolver.GetPrefix(typeDescriptor)); }
public string GetPrefix(ExtractedTypeDescriptor typeDescriptor) { return(Prefix); }
/// <summary> /// Gets the namespace (or prefix) of the given type /// </summary> /// <param name="typeDescriptor">The type descriptor</param> /// <returns>The namespace or prefix, or null if not applicable</returns> protected virtual string GetTypeNamespace(ExtractedTypeDescriptor typeDescriptor) { return(typeDescriptor.Namespace); }