C# Class IronPython.Runtime.Types.NewTypeInfo

TypeInfo captures the minimal CLI information required by NewTypeMaker for a Python object that inherits from a CLI type.
Exibir arquivo Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
Equals ( object obj ) : bool
GetHashCode ( ) : int
GetTypeInfo ( string typeName, PythonTuple bases ) : NewTypeInfo

"bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some examples of how this works: (bases) => baseType, {interfaceTypes} (cpy1) => System.Object, {} (cpy1, cpy2) => System.Object, {} (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} [some type that satisfies the line above] => cCLI1, {iCLI1, iCLI2} (cCLI1, cCLI2) => error

NewTypeInfo ( Type baseType, IList interfaceTypes ) : System

Private Methods

Method Description
GetBaseTypeFromUserType ( IronPython.Runtime.Types.PythonType curBasePythonType, IList baseInterfaces, Type curTypeToExtend ) : Type
GetPythonTypes ( string typeName, ICollection bases ) : IEnumerable

Filters out old-classes and throws if any non-types are included, returning a yielding the remaining PythonType objects.

Method Details

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetTypeInfo() public static method

"bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some examples of how this works: (bases) => baseType, {interfaceTypes} (cpy1) => System.Object, {} (cpy1, cpy2) => System.Object, {} (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} [some type that satisfies the line above] => cCLI1, {iCLI1, iCLI2} (cCLI1, cCLI2) => error
public static GetTypeInfo ( string typeName, PythonTuple bases ) : NewTypeInfo
typeName string
bases PythonTuple
return NewTypeInfo

NewTypeInfo() public method

public NewTypeInfo ( Type baseType, IList interfaceTypes ) : System
baseType System.Type
interfaceTypes IList
return System