private static string FullTypeNameInProject(IProject project, string templateId, ITypeReference typeInfo) { // Hack for bug in 1.4: var associationEnd = typeInfo as IAssociationEnd; if (associationEnd != null && associationEnd.Id == associationEnd.Association.Id) { return(project.FindTemplateInstance <IHasClassDetails>( TemplateDependancy.OnModel <IMetaModel>(templateId, (x) => x.Id == associationEnd.Class.Id)) ?.FullTypeName()); } return(project.FindTemplateInstance <IHasClassDetails>( TemplateDependancy.OnModel <IMetaModel>(templateId, (x) => x.Id == typeInfo.Id)) ?.FullTypeName()); }
private static string FullTypeNameInApplication(IApplication application, string templateId, ITypeReference typeInfo) { return(application.FindTemplateInstance <IHasClassDetails>( TemplateDependancy.OnModel <IMetaModel>(templateId, (x) => x.Id == typeInfo.Id)) ?.FullTypeName()); }