public BaristaModuleRecordFactory(IJavaScriptEngine engine, IServiceProvider serviceProvider)
 {
     m_engine                = engine ?? throw new ArgumentNullException(nameof(engine));
     m_serviceProvider       = serviceProvider;
     m_moduleReferencePool   = new BaristaObjectPool <BaristaModuleRecord, JavaScriptModuleRecord>();
     m_specifierModuleLookup = new Dictionary <JavaScriptValueSafeHandle, JavaScriptModuleRecord>();
 }
Exemplo n.º 2
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (m_runtimePool != null)
         {
             m_runtimePool.Dispose();
             m_runtimePool = null;
         }
     }
 }
Exemplo n.º 3
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (m_contextPool != null)
         {
             m_contextPool.Dispose();
             m_contextPool = null;
         }
     }
 }
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (m_moduleReferencePool != null)
         {
             m_moduleReferencePool.Dispose();
             m_moduleReferencePool = null;
         }
     }
 }
Exemplo n.º 5
0
 public BaristaValueFactory(IJavaScriptEngine engine, BaristaContext context)
 {
     m_engine    = engine ?? throw new ArgumentNullException(nameof(engine));
     m_context   = context ?? throw new ArgumentNullException(nameof(context));
     m_valuePool = new BaristaObjectPool <JsValue, JavaScriptValueSafeHandle>();
 }
Exemplo n.º 6
0
 public BaristaContextFactory(IJavaScriptEngine engine, IServiceProvider serviceProvider)
 {
     m_engine          = engine ?? throw new ArgumentNullException(nameof(engine));
     m_serviceProvider = serviceProvider;
     m_contextPool     = new BaristaObjectPool <BaristaContext, JavaScriptContextSafeHandle>();
 }