Fix for late binding
Status: Beta
Brought to you by:
fitsner
In source file ObjectCreateRule.cs, there is a bug at line 103 in method OnBegin, for which the correction is as follows :
/// <summary>
/// Process the start of this element.
/// </summary>
public override void OnBegin()
{
// define a type of the object to create
Type realType = type;
if(attribute != null)
{
string val = digester.Attributes[attribute];
if(val != null)
{
realType = Type.GetType(val, true, true);
}
}
// create object instance
/object obj = Activator.CreateInstance(type); //Incorrect
object obj = Activator.CreateInstance(realType); //Correct
digester.Push(obj);
}