예제 #1
0
파일: Machine.cs 프로젝트: ajlopez/AjTalk
 public void RegisterNativeBehavior(Type type, NativeBehavior behavior)
 {
     this.nativeBehaviors[type] = behavior;
 }
예제 #2
0
파일: Machine.cs 프로젝트: ajlopez/AjTalk
        public IBehavior CreateNativeBehavior(IBehavior superclass, Type type)
        {
            IMetaClass supermeta = null;

            if (superclass != null)
                supermeta = superclass.MetaClass;

            IMetaClass meta = new BaseMetaClass(this.metaclassclass, supermeta, this, string.Empty);
            NativeBehavior behavior = new NativeBehavior(meta, superclass, this, type);
            return behavior;
        }