public LuaTransparentClrObject(object obj, ILuaBinder binder, IBindingSecurityPolicy bindingSecurityPolicy) : base(obj)
        {
            Binder = binder ?? BasicLuaBinder.Instance;
            BindingSecurityPolicy = bindingSecurityPolicy ?? defaultSecurityPolicy;

            proxy = new TransparentClrObjectProxy(this);
        }
Пример #2
0
        public LuaTransparentClrObject(object obj, ILuaBinder binder = null, IBindingSecurityPolicy bindingSecurityPolicy = null) : base(obj)
        {
            Binder = binder ?? BasicLuaBinder.Instance;
            if (bindingSecurityPolicy == null) {
                if (Binder is ReflectionLuaBinder) {
                    BindingSecurityPolicy = defaultReflectionBindingSecurityPolicy;
                } else {
                    BindingSecurityPolicy = defaultBasicBindingSecurityPolicy;
                }
            } else BindingSecurityPolicy = bindingSecurityPolicy;

            proxy = new TransparentClrObjectProxy(this);
        }
Пример #3
0
        } // func GetConvertBinder

        #endregion

        #region -- Binder Expression Helper -----------------------------------------------

        internal static Lua GetRuntime(object v)
        {
            ILuaBinder a = v as ILuaBinder;

            return(a != null ? a.Lua : null);
        } // func GetRuntime
Пример #4
0
 public LuaTransparentClrObject(object obj, bool autobind, IBindingSecurityPolicy bindingSecurityPolicy = null) : this(obj, BasicLuaBinder.Instance) {
     if (autobind) {
         Binder = ReflectionLuaBinder.Instance;
         BindingSecurityPolicy = bindingSecurityPolicy ?? defaultReflectionBindingSecurityPolicy;
     }
 }