public bool Initialize(Package package) { if (package == null) { InstallerEngine.ReportProgress(LogLevel.Error, "PythonPluginInfo::Initialize called with null package"); return(false); } PackageFileKey plugin_py_key = package.FindSingleFile("__plugin__.py"); string plugin_py = package.GetFullPath(plugin_py_key); if (plugin_py == null) { return(false); } if (!LoadPluginPyFile(plugin_py)) { return(false); } ReadCommandsFromPackage(package); InstallerEngine.ReportProgress(LogLevel.Info, "PythonPluginInfo::Initialize failed"); return(this.IsValid()); }
/// <summary> /// Derived classes can (and should) report their progress throughout. /// This method provides thread-safe and thread-agnostic access to the /// main logging engine. /// </summary> /// <param name="message">The message to log</param> /// <param name="level">Log Level</param> public static void ReportProgress(string message, LogLevel level) { InstallerEngine.ReportProgress(level, message); }