Ejemplo n.º 1
0
 public ExprNewInstanceNodeForgeEval(
     ExprNewInstanceNodeForge forge,
     InstanceManufacturer manufacturer)
 {
     this.forge = forge;
     this.manufacturer = manufacturer;
 }
Ejemplo n.º 2
0
        public override ExprNode Validate(ExprValidationContext validationContext)
        {
            Type targetClass;
            try {
                targetClass = validationContext.ImportService.ResolveClass(classIdent, false);
            }
            catch (ImportException) {
                throw new ExprValidationException("Failed to resolve new-operator class name '" + classIdent + "'");
            }

            InstanceManufacturerFactory manufacturerFactory =
                InstanceManufacturerFactoryFactory.GetManufacturer(
                    targetClass,
                    validationContext.ImportService,
                    ChildNodes);
            forge = new ExprNewInstanceNodeForge(this, targetClass, manufacturerFactory);
            return null;
        }