/// <summary> /// Add a class to this module /// If this class already exists, throw an exception /// </summary> /// <param name="aClass">The class to be added</param> public void AddClass(ClassDef aClass) { Contract.Requires(aClass != null); ClassDef eClass = GetClass(aClass.NameSpace, aClass.Name); if (eClass != null) { throw new DescriptorException("Class " + aClass.NameString()); } classes.Add(aClass); // MERGE change Refs to Defs here, fix this aClass.SetScope((PEFile)this); }