Esempio n. 1
0
 protected T PreInit <T>(WaterboxOptions options)
     where T : LibWaterboxCore
 {
     options.Path ??= CoreComm.CoreFileProvider.DllPath();
     _exe = new WaterboxHost(options);
     using (_exe.EnterExit())
     {
         var ret = BizInvoker.GetInvoker <T>(_exe, _exe, CallingConventionAdapters.Waterbox);
         _core = ret;
         return(ret);
     }
 }
Esempio n. 2
0
 protected T PreInit <T>(PeRunnerOptions options)
     where T : LibWaterboxCore
 {
     if (options.Path == null)
     {
         options.Path = CoreComm.CoreFileProvider.DllPath();
     }
     _exe = new PeRunner(options);
     using (_exe.EnterExit())
     {
         var ret = BizInvoker.GetInvoker <T>(_exe, _exe, CallingConventionAdapters.Waterbox);
         _core = ret;
         return(ret);
     }
 }
Esempio n. 3
0
        protected T PreInit <T>(WaterboxOptions options, IEnumerable <Delegate> allExtraDelegates = null)
            where T : LibWaterboxCore
        {
            options.Path ??= CoreComm.CoreFileProvider.DllPath();
            _exe = new WaterboxHost(options);
            var delegates = new Delegate[] { _inputCallback }.AsEnumerable();

            if (allExtraDelegates != null)
            {
                delegates = delegates.Concat(allExtraDelegates);
            }
            using (_exe.EnterExit())
            {
                var ret = BizInvoker.GetInvoker <T>(_exe, _exe, CallingConventionAdapters.MakeWaterbox(delegates, _exe));
                _core = ret;
                return(ret);
            }
        }