Exemple #1
0
        /// <summary>
        /// Asynchrously loads the specified extension module into the type
        /// database making the completions available.
        ///
        /// If the module has not already been analyzed it will be analyzed and
        /// then loaded.
        ///
        /// If the specified module was already loaded it replaces the existing
        /// module.
        ///
        /// Returns a new Task which can be blocked upon until the analysis of
        /// the new extension module is available.
        ///
        /// If the extension module cannot be analyzed an exception is reproted.
        /// </summary>
        /// <param name="cancellationToken">A cancellation token which can be
        /// used to cancel the async loading of the module</param>
        /// <param name="extensionModuleFilename">The filename of the extension
        /// module to be loaded</param>
        /// <param name="interpreter">The Python interprefer which will be used
        /// to analyze the extension module.</param>
        /// <param name="moduleName">The module name of the extension module.</param>
        public void LoadExtensionModule(
            ModulePath moduleName,
            CancellationToken cancellationToken = default(CancellationToken)
            )
        {
            var loader = new ExtensionModuleLoader(
                this,
                _factory,
                moduleName,
                cancellationToken
                );

            loader.LoadExtensionModule();
        }
Exemple #2
0
 /// <summary>
 /// Asynchrously loads the specified extension module into the type
 /// database making the completions available.
 /// 
 /// If the module has not already been analyzed it will be analyzed and
 /// then loaded.
 /// 
 /// If the specified module was already loaded it replaces the existing
 /// module.
 /// 
 /// Returns a new Task which can be blocked upon until the analysis of
 /// the new extension module is available.
 /// 
 /// If the extension module cannot be analyzed an exception is reproted.
 /// </summary>
 /// <param name="cancellationToken">A cancellation token which can be
 /// used to cancel the async loading of the module</param>
 /// <param name="extensionModuleFilename">The filename of the extension
 /// module to be loaded</param>
 /// <param name="interpreter">The Python interprefer which will be used
 /// to analyze the extension module.</param>
 /// <param name="moduleName">The module name of the extension module.</param>
 public void LoadExtensionModule(
     ModulePath moduleName,
     CancellationToken cancellationToken = default(CancellationToken)
 ) {
     var loader = new ExtensionModuleLoader(
         this,
         _factory,
         moduleName,
         cancellationToken
     );
     loader.LoadExtensionModule();
 }