public LuaTransparentClrObject(object obj, ILuaBinder binder, IBindingSecurityPolicy bindingSecurityPolicy) : base(obj) { Binder = binder ?? BasicLuaBinder.Instance; BindingSecurityPolicy = bindingSecurityPolicy ?? defaultSecurityPolicy; proxy = new TransparentClrObjectProxy(this); }
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); }
} // 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
public LuaTransparentClrObject(object obj, bool autobind, IBindingSecurityPolicy bindingSecurityPolicy = null) : this(obj, BasicLuaBinder.Instance) { if (autobind) { Binder = ReflectionLuaBinder.Instance; BindingSecurityPolicy = bindingSecurityPolicy ?? defaultReflectionBindingSecurityPolicy; } }