public void SetAttribute(string name, IodineObject value) { if (value is IodineMethod) { IodineMethod method = (IodineMethod)value; if (method.InstanceMethod) { Attributes [name] = new IodineInstanceMethodWrapper(this, method); } else { Attributes [name] = value; } } else if (value is IodineInstanceMethodWrapper) { IodineInstanceMethodWrapper wrapper = (IodineInstanceMethodWrapper)value; Attributes [name] = new IodineInstanceMethodWrapper(this, wrapper.Method); } else if (value is IodineProperty) { IodineProperty property = (IodineProperty)value; Attributes [name] = new IodineProperty(property.Getter, property.Setter, this); } else { Attributes [name] = value; } }
public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod, IodineObject[] args) : base(TypeDefinition) { arguments = args; self = baseMethod.Self; this.baseMethod = baseMethod.Method; }
public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod, IodineObject[] args) : base(TypeDef) { arguments = args; self = baseMethod.Self; this.baseMethod = baseMethod.Method; }
public void SetAttribute (string name, IodineObject value) { if (value is IodineMethod) { IodineMethod method = (IodineMethod)value; if (method.InstanceMethod) { Attributes [name] = new IodineInstanceMethodWrapper (this, method); } else { Attributes [name] = value; } } else if (value is IodineInstanceMethodWrapper) { IodineInstanceMethodWrapper wrapper = (IodineInstanceMethodWrapper)value; Attributes [name] = new IodineInstanceMethodWrapper (this, wrapper.Method); } else if (value is IodineProperty) { IodineProperty property = (IodineProperty)value; Attributes [name] = new IodineProperty (property.Getter, property.Setter, this); } else { Attributes [name] = value; } }