public ClassUnit(Type type, ClassUnit parent = null) { Debug.Assert(type != null); Type = type; Namespace = CompilationUnit.GetNamespace(type.Namespace); if (parent != null) { Parent = parent; } else { Parent = Namespace; } classes.Add(type, this); }