コード例 #1
0
ファイル: BootStrap.cs プロジェクト: young40/UniBrick
    private void RegisterILRuntimes(IXILRuntime appdomain)
    {
        appdomain.RegisterXComponent();
        appdomain.RegisterUIKit();

        appdomain.DelegateManager.RegisterMethodDelegate <Int32>();
        appdomain.DelegateManager.RegisterMethodDelegate <Int32, Int32>();
        appdomain.DelegateManager.RegisterMethodDelegate <System.Int64>();
        appdomain.DelegateManager.RegisterMethodDelegate <TinaX.VFSKit.ISceneAsset, TinaX.XException>();

        appdomain.DelegateManager.RegisterMethodDelegate <UniRx.CollectionAddEvent <ILRuntime.Runtime.Intepreter.ILTypeInstance> >();

        appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Boolean>();

        appdomain.DelegateManager.RegisterDelegateConvertor <TinaX.UIKit.DataBinding.BindableProperty <Int32> .ValueChangedDalegate>(act =>
        {
            return(new TinaX.UIKit.DataBinding.BindableProperty <Int32> .ValueChangedDalegate((oldValue, newValue) =>
            {
                ((Action <System.Int32, System.Int32>)act)(oldValue, newValue);
            }));
        });

        appdomain.DelegateManager.RegisterDelegateConvertor <UnityEngine.Events.UnityAction <System.Int32> >((act) =>
        {
            return(new UnityEngine.Events.UnityAction <System.Int32>((arg0) =>
            {
                ((Action <System.Int32>)act)(arg0);
            }));
        });
    }
コード例 #2
0
        private void RegisterILRuntimes(IXILRuntime xil)
        {
            xil.RegisterXComponent();
            xil.RegisterUIKit();

            xil.DelegateManager.RegisterMethodDelegate <Int32, Int32>();

            xil.DelegateManager.RegisterMethodDelegate <TinaX.VFSKit.ISceneAsset, TinaX.XException>();

            xil.DelegateManager.RegisterDelegateConvertor <TinaX.UIKit.DataBinding.BindableProperty <System.Int32> .ValueChangedDalegate>((act) =>
            {
                return(new TinaX.UIKit.DataBinding.BindableProperty <System.Int32> .ValueChangedDalegate((oldValue, newValue) =>
                {
                    ((Action <System.Int32, System.Int32>)act)(oldValue, newValue);
                }));
            });
        }