mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:31:40 +00:00
* refactor the code to make it more OOP and extensible
* remove old outdated SD project files * make it use some .NET 2.0 features as generic collections and settings svn path=/trunk/; revision=31130
This commit is contained in:
parent
588f8770cd
commit
82b5e2eb8b
31 changed files with 687 additions and 491 deletions
|
@ -2,33 +2,29 @@ using System;
|
|||
|
||||
namespace TechBot.Library
|
||||
{
|
||||
public class SvnCommand : BaseCommand, ICommand
|
||||
public class SvnCommand : Command
|
||||
{
|
||||
private IServiceOutput serviceOutput;
|
||||
private string svnCommand;
|
||||
private string m_SvnRoot;
|
||||
|
||||
public SvnCommand(IServiceOutput serviceOutput,
|
||||
string svnCommand)
|
||||
public SvnCommand(TechBotService techBot)
|
||||
: base(techBot)
|
||||
{
|
||||
this.serviceOutput = serviceOutput;
|
||||
this.svnCommand = svnCommand;
|
||||
m_SvnRoot = Settings.Default.SVNRoot;
|
||||
}
|
||||
|
||||
public override string[] AvailableCommands
|
||||
{
|
||||
get { return new string[] { "svn" }; }
|
||||
}
|
||||
|
||||
public bool CanHandle(string commandName)
|
||||
{
|
||||
return CanHandle(commandName,
|
||||
new string[] { "svn" });
|
||||
}
|
||||
|
||||
public void Handle(MessageContext context,
|
||||
public override void Handle(MessageContext context,
|
||||
string commandName,
|
||||
string parameters)
|
||||
{
|
||||
serviceOutput.WriteLine(context,
|
||||
svnCommand);
|
||||
TechBot.ServiceOutput.WriteLine(context, string.Format("svn co {0}" , m_SvnRoot));
|
||||
}
|
||||
|
||||
public string Help()
|
||||
|
||||
public override string Help()
|
||||
{
|
||||
return "!svn";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue