本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}