src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add a class to this Scope.  If the class already exists,
/// throw an exception.
/// </summary>
/// <param name="nsName">name space name</param>
/// <param name="name">class name</param>
/// <returns>a descriptor for this class in another module</returns>
Add a class to this Scope.  If the class already exists,
throw an exception.
Add a class to this Scope . If the class already exists throw an exception .
public virtual ClassRef AddClass(string nsName, string name) {
            ClassRef aClass = GetClass(nsName,name);
            if (aClass != null) {
                if ((aClass is SystemClass) && (!((SystemClass)aClass).added))
                    ((SystemClass)aClass).added = true;
                else
                    throw new DescriptorException("Class " + aClass.NameString());
            } else {
                aClass = new ClassRef(this,nsName,name);
                classes.Add(aClass);
            }
            return aClass;
        }
public virtual ClassRef AddClass ( string nsName , string name ) { ClassRef aClass = GetClass ( nsName , name ) ; if ( aClass != null ) { if ( ( aClass is SystemClass ) && ( ! ( ( SystemClass ) aClass ) . added ) ) ( ( SystemClass ) aClass ) . added = true ; else throw new DescriptorException ( " " + aClass . NameString ( ) ) ; } else { aClass = new ClassRef ( this , nsName , name ) ; classes . Add ( aClass ) ; } return aClass ; }
Add a class to this Scope.
Add a class to this Scope .
a descriptor for this class in another module
a descriptor for this class in another module
nsName
string
name space name
name space name
name
string
None