// Get the global context engine. Use this in preference // to directly accessing the "contextEngine" variable. internal static VsaEngine GetContextEngine() { // Lock on "VsaEngine" to synchronize with "CreateEngine()". lock (typeof(VsaEngine)) { if (contextEngine == null) { contextEngine = VsaEngine.MakeNewEngine(); } return(contextEngine); } }