Have an IronPython package named "Entities". That package contains an "Entity.py" file that defines a "Customer" class and an "Address" class.
If I run this program:
customer = Customer()
print customer.GetType().AssemblyQualifiedName
address = Address()
print address.GetType().AssemblyQualifiedName
I get this output:
IronPython.NewTypes.System.Object_1$1, Snippets.scripting, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
IronPython.NewTypes.System.Object_1$1, Snippets.scripting, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
How does that work? Why do both types have the same type name (Object_1$1
)?
I have to use an API that requires the Assembly Qualified Name for a type to create instances of that type. I'd like to be able to use it this way:
customer = aFactory.Create("Entities.Customer, Entities");
How will I do that? Is there any way to specify the namespace and assembly name?
Thanks