Example #1
0
 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;
     }
 }
Example #2
0
 public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod,
                        IodineObject[] args)
     : base(TypeDefinition)
 {
     arguments       = args;
     self            = baseMethod.Self;
     this.baseMethod = baseMethod.Method;
 }
Example #3
0
        public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod,
			IodineObject[] args)
            : base(TypeDef)
        {
            arguments = args;
            self = baseMethod.Self;
            this.baseMethod = baseMethod.Method;
        }
Example #4
0
		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;
			}
		}