private static TypeCoupling CreateTypeCoupling(ITypeSymbol typeSymbol, IEnumerable<string> usedMethods, IEnumerable<string> usedProperties, IEnumerable<string> events)
{
var name = typeSymbol.IsAnonymousType ? typeSymbol.ToDisplayString() : typeSymbol.Name;
var namespaceName = string.Join(".", GetFullNamespace(typeSymbol.ContainingNamespace));
if (string.IsNullOrWhiteSpace(namespaceName))
{
namespaceName = "global";
}
var assemblyName = "Unknown";
if (typeSymbol.ContainingAssembly != null)
{
assemblyName = typeSymbol.ContainingAssembly.Name;
}
return new TypeCoupling(name, namespaceName, assemblyName, usedMethods, usedProperties, events);
}