Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineNoLockNoNotification C# (CSharp) Méthode

GetEngineNoLockNoNotification() private méthode

Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. The method doesn't lock nor send notifications to the host.
private GetEngineNoLockNoNotification ( LanguageContext language, bool &freshEngineCreated ) : ScriptEngine
language LanguageContext
freshEngineCreated bool
Résultat ScriptEngine
        private ScriptEngine GetEngineNoLockNoNotification(LanguageContext language, out bool freshEngineCreated) {
            Debug.Assert(_engines != null, "Invalid ScriptRuntime initialiation order");

            ScriptEngine engine;
            if (freshEngineCreated = !_engines.TryGetValue(language, out engine)) {
                engine = new ScriptEngine(this, language);
                Thread.MemoryBarrier();
                _engines.Add(language, engine);
            }
            return engine;
        }