Exemplo n.º 1
0
        public override void Install(BasePluginPointer ptr, string folder)
        {
            string cdir = GetConfigDir(folder);
            string bdir = GetBinPath(folder);

            if (Directory.Exists(cdir))
            {
                HelperClass.CopyTo(cdir, PluginPaths.GetPluginConfigDirectory(ptr));
            }

            if (Directory.Exists(bdir))
            {
                HelperClass.CopyTo(bdir, PluginPaths.GetPluginAssemblyDirectory(ptr));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     To String Implementation Listing all Retrievable Information about the Plugin.
        /// </summary>
        /// <returns>Information Text about this Object.</returns>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("General:");
            builder.AppendLine("\tIs Initialized: " + PluginManager.IsInitialized);
            builder.AppendLine("\tSystem Config Path: " + PluginPaths.InternalSystemConfigPath);
            builder.AppendLine("\tPlugin Dir: " + PluginPaths.PluginDirectory);
            builder.AppendLine("\tInstalled Packages Path: " + PluginPaths.PluginListFile);
            builder.AppendLine("\tGlobal Packages Path: " + PluginPaths.GlobalPluginListFile);

            builder.AppendLine();
            builder.AppendLine();

            builder.AppendLine("Plugin:");
            builder.AppendLine("Name: " + PluginName);
            builder.AppendLine("\tFile: " + PluginName);
            builder.AppendLine("\tPlugin Directory: " + PluginPaths.GetPluginDirectory(PluginName));
            builder.AppendLine("\tPlugin Config Directory: " + PluginPaths.GetPluginConfigDirectory(PluginName));
            builder.AppendLine("\tPlugin Assembly Directory: " + PluginPaths.GetPluginAssemblyDirectory(PluginName));
            builder.AppendLine("\tPlugin Temp Directory: " + PluginPaths.GetPluginTempDirectory(PluginName));

            //builder.AppendLine($"\tPlugin Archive Backup: " + PluginPaths.GetPluginArchiveBackup(PluginName));
            //builder.AppendLine($"\t\tPlugin Archive Backup Exists: " + File.Exists(PluginPaths.GetPluginArchiveBackup(PluginName)));
            builder.AppendLine("\tPlugin Assembly File: " + PluginPaths.GetPluginAssemblyFile(PluginName, PluginFile));
            builder.AppendLine(
                "\t\tPlugin Assembly File Exists: " +
                File.Exists(PluginPaths.GetPluginAssemblyFile(PluginName, PluginFile))
                );

            //builder.AppendLine($"\tPlugin Version File: " + PluginPaths.GetPluginVersionFile(PluginName));
            //builder.AppendLine($"\t\tPlugin Version File Exists: " + File.Exists(PluginPaths.GetPluginVersionFile(PluginName)));
            //builder.AppendLine($"\t\tPlugin Version File Key: " + PluginPaths.GetPluginVersion(PluginName));
            //builder.AppendLine($"\t\tPlugin Version File Value: " + PluginPaths.GetPluginOriginURL(PluginName));
            return(builder.ToString());
        }