private static StringBuilder AppendTypeName(this StringBuilder builder, TypeDef typeDef, INameService nameService) { var originalNamespace = nameService.GetOriginalNamespace(typeDef); var originalName = nameService.GetOriginalName(typeDef); if (string.IsNullOrWhiteSpace(originalNamespace)) { originalNamespace = typeDef.Namespace; } if (string.IsNullOrWhiteSpace(originalName)) { originalName = typeDef.Name; } if (!string.IsNullOrWhiteSpace(originalNamespace)) { builder.Append(originalNamespace).Append("."); } return(builder.Append(originalName)); }