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; } }
public void Dispose() { _runtimeEngine?.Dispose(); _instance = null; }