src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add a class to this Scope.  If this class already exists, throw
/// an exception
/// </summary>
/// <param name="newClass">The class to be added</param>
Add a class to this Scope.  If this class already exists, throw
an exception
Add a class to this Scope . If this class already exists throw an exception
public void AddClass(ClassRef newClass) {
            ClassRef aClass = (ClassRef)GetClass(newClass.NameSpace(),newClass.Name(),true);
            if (aClass != null)
                throw new DescriptorException("Class " + newClass.NameString());
            if (Diag.DiagOn) Console.WriteLine("Adding class " + newClass.Name() + " to ResolutionScope " + name);
            classes.Add(newClass);
            newClass.SetScope(this);
        }
public void AddClass ( ClassRef newClass ) { ClassRef aClass = ( ClassRef ) GetClass ( newClass . NameSpace ( ) , newClass . Name ( ) , true ) ; if ( aClass != null ) throw new DescriptorException ( " " + newClass . NameString ( ) ) ; if ( Diag . DiagOn ) Console . WriteLine ( " " + newClass . Name ( ) + " " + name ) ; classes . Add ( newClass ) ; newClass . SetScope ( this ) ; }
Add a class to this Scope.
Add a class to this Scope .
// Change Refs to Defs here
newClass
ClassRef
The class to be added
The class to be added