当前位置: 首页>>代码示例>>C#>>正文


C# IodineObject.HasAttribute方法代码示例

本文整理汇总了C#中Iodine.Runtime.IodineObject.HasAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# IodineObject.HasAttribute方法的具体用法?C# IodineObject.HasAttribute怎么用?C# IodineObject.HasAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Iodine.Runtime.IodineObject的用法示例。


在下文中一共展示了IodineObject.HasAttribute方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindAttributes

 public IodineObject BindAttributes(IodineObject obj)
 {
     foreach (KeyValuePair<string, IodineObject> kv in attributes) {
         if (!obj.HasAttribute (kv.Key))
             obj.SetAttribute (kv.Key, kv.Value);
     }
     return obj;
 }
开发者ID:iwatakeshi,项目名称:Iodine,代码行数:8,代码来源:IodineTypeDefinition.cs

示例2: Inherit

		public override void Inherit (VirtualMachine vm, IodineObject self, IodineObject[] arguments)
		{
			foreach (IodineMethod method in RequiredMethods) {
				if (!self.HasAttribute (method.Name)) {
					vm.RaiseException (new IodineNotSupportedException ());
					return;
				}
			}
			self.Interfaces.Add (this);
		}
开发者ID:GruntTheDivine,项目名称:Iodine,代码行数:10,代码来源:IodineInterface.cs

示例3: Inherit

 public virtual void Inherit(VirtualMachine vm, IodineObject self, IodineObject[] arguments)
 {
     IodineObject obj = this.Invoke (vm, arguments);
     foreach (string attr in attributes.Keys) {
         if (!self.HasAttribute (attr))
             self.SetAttribute (attr, attributes [attr]);
         obj.SetAttribute (attr, attributes [attr]);
     }
     self.SetAttribute ("__super__", obj);
     self.Base = obj;
 }
开发者ID:iwatakeshi,项目名称:Iodine,代码行数:11,代码来源:IodineTypeDefinition.cs

示例4: Inherit

        public override void Inherit(VirtualMachine vm, IodineObject self, IodineObject[] arguments)
        {
            IodineObject obj = Invoke (vm, arguments);

            foreach (KeyValuePair<string, IodineObject> kv in attributes) {
                if (!self.HasAttribute (kv.Key))
                    self.SetAttribute (kv.Key, kv.Value);
                if (!obj.HasAttribute (kv.Key))
                    obj.SetAttribute (kv.Key, kv.Value);
            }
            self.SetAttribute ("__super__", obj);
            self.Base = obj;
        }
开发者ID:iwatakeshi,项目名称:Iodine,代码行数:13,代码来源:IodineClass.cs

示例5: Inherit

		public override void Inherit (VirtualMachine vm, IodineObject self, IodineObject[] arguments)
		{
			IodineObject obj = Invoke (vm, arguments);

			foreach (KeyValuePair<string, IodineObject> kv in Attributes) {
				if (!self.HasAttribute (kv.Key))
					self.SetAttribute (kv.Key, kv.Value);
				if (!obj.HasAttribute (kv.Key)) {
					obj.SetAttribute (kv.Key, kv.Value);
				}
			}
			Dictionary<string, IodineObject> childAttributes = obj.Attributes;

			foreach (KeyValuePair<string, IodineObject> kv in childAttributes) {
				if (kv.Value is IodineInstanceMethodWrapper) {
					IodineInstanceMethodWrapper wrapper = (IodineInstanceMethodWrapper)kv.Value;
					wrapper.Rewrap (self);
				}
			}
			self.SetAttribute ("__super__", obj);
			self.Base = obj;
		}
开发者ID:GruntTheDivine,项目名称:Iodine,代码行数:22,代码来源:IodineClass.cs


注:本文中的Iodine.Runtime.IodineObject.HasAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。