private DelegateVertexAndEdgeListGraph<IType, SEquatableEdge<IType>> CreateGraph()
        {
            var graphDictionary = new TypeReferenceCountDict(typeReferenceCountDict.Keys);
            foreach (var names in typeReferenceCountDict.Values.Select(v => v.Keys))
            {
                foreach (var name in names.Where(name => !graphDictionary.ContainsKey(name)))
                {
                    graphDictionary.Add(name);
                }
            }
            foreach (var assembly in typeReferenceCountDict)
            {
                graphDictionary[assembly.Key] = assembly.Value;
            }

            var graph =
                graphDictionary.ToVertexAndEdgeListGraph(
                    kv => kv.Value.Select(v => new SEquatableEdge<IType>(kv.Key, v.Key)));
            return graph;
        }
        public string GetReferencedTypesGraph()
        {
            var types = Assembly.GetTypes();

            var referencedTypes = new TypeReferenceCountDict();
            var typereferences = types.Select(x => x.GetReferencedTypes()).ToList();
            foreach (var typeref in typereferences)
            {
                foreach (var type in typeref)
                {
                    if (!referencedTypes.ContainsKey(type.Key))
                    {
                        referencedTypes.Add(type.Key, type.Key.GetReferencedTypes());
                    }
                }
            }
            var typeReferenceGraph = new TypeReferenceCountDictGraphConverter(referencedTypes);
            var graphMarkup = typeReferenceGraph.Convert();

            return graphMarkup;
        }
 public TypeReferenceCountDictGraphConverter(TypeReferenceCountDict typeReferenceCountDict, IGraphMarkup<IType> markup = null)
 {
     this.typeReferenceCountDict = typeReferenceCountDict;
     this.markup = markup;
 }