/// <summary> /// Constructor for generic module interface /// </summary> public DynamicModule(Duplicati.Library.Interface.IGenericModule module) { this.Key = module.Key; this.Description = module.Description; this.DisplayName = module.DisplayName; if (module.SupportedCommands != null) { this.Options = module.SupportedCommands.ToArray(); } }
private static void PrintGenericModule(Duplicati.Library.Interface.IGenericModule mod, List<string> lines) { lines.Add(mod.DisplayName + " (" + mod.Key + "):"); lines.Add(" " + mod.Description); lines.Add(" " + (mod.LoadAsDefault ? Strings.Program.ModuleIsLoadedAutomatically : Strings.Program.ModuleIsNotLoadedAutomatically)); if (mod.SupportedCommands != null && mod.SupportedCommands.Count > 0) { lines.Add(" " + Strings.Program.SupportedOptionsHeader); foreach (Library.Interface.ICommandLineArgument arg in mod.SupportedCommands) Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " "); } lines.Add(""); }