コード例 #1
0
ファイル: IodineObject.cs プロジェクト: parhelia512/nginz
 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;
     }
 }
コード例 #2
0
ファイル: IodineGenerator.cs プロジェクト: parhelia512/nginz
 public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod,
                        IodineObject[] args)
     : base(TypeDefinition)
 {
     arguments       = args;
     self            = baseMethod.Self;
     this.baseMethod = baseMethod.Method;
 }
コード例 #3
0
ファイル: IodineGenerator.cs プロジェクト: iwatakeshi/Iodine
        public IodineGenerator(StackFrame parentFrame, IodineInstanceMethodWrapper baseMethod,
			IodineObject[] args)
            : base(TypeDef)
        {
            arguments = args;
            self = baseMethod.Self;
            this.baseMethod = baseMethod.Method;
        }
コード例 #4
0
ファイル: IodineObject.cs プロジェクト: GruntTheDivine/Iodine
		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;
			}
		}