Esempio n. 1
0
        public EngineHandle()
        {
            I18NOption i18NOption = new I18NOption(typeof(EngineHandle).Assembly, "i18n_engineCore_zh.resx",
                                                   "i18n_engineCore_en.resx")
            {
                Name = Constants.I18nName
            };

            I18N.InitInstance(i18NOption);

            if (null != _instance)
            {
                I18N i18N = I18N.GetInstance(Constants.I18nName);
                throw new TestflowRuntimeException(CommonErrorCode.InternalError, i18N.GetStr("InstAlreadyExist"));
            }
            lock (_instLock)
            {
                Thread.MemoryBarrier();
                if (null != _instance)
                {
                    I18N i18N = I18N.GetInstance(Constants.I18nName);
                    throw new TestflowRuntimeException(CommonErrorCode.InternalError, i18N.GetStr("InstAlreadyExist"));
                }
                _instance = this;
            }
        }
Esempio n. 2
0
 public void Dispose()
 {
     _runtimeEngine?.Dispose();
     _instance = null;
 }