~cafg10/bazaarsharp/trunk

« back to all changes in this revision

Viewing changes to BzrSharp/Commands/Command.cs

  • Committer: Carlos Flores
  • Date: 2010-06-06 19:07:30 UTC
  • Revision ID: cafg10@gmail.com-20100606190730-bovboh9wk4tsxhb8
Changes to move and add commands to correctly handle the new URI arguments system

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
using System.Linq;
21
21
using Bazaar.Results;
22
22
using StructureMap;
23
 
using System.Text;
24
23
 
25
24
namespace Bazaar.Commands
26
25
{
50
49
            workingDirectory = new Uri(directory.FullName);
51
50
        }
52
51
 
 
52
        public Command(Uri workingDirectory)
 
53
        {
 
54
            this.workingDirectory = workingDirectory;
 
55
        }
 
56
 
53
57
        public virtual IEnumerable<IResult> Run()
54
58
        {
55
59
            var client = ObjectFactory.GetInstance<IClient>();
56
 
            response = new Response(client.Run(Arguments.ToArray(), workingDirectory.AbsoluteUri));
 
60
            response = new Response(client.Run(Arguments.ToArray(), workingDirectory.AbsolutePath));
57
61
            return Results;
58
62
        }
59
63
 
78
82
 
79
83
        /// <summary>
80
84
        /// Helps retrieving result messages from the command, MUST be overrided by
81
 
        /// Inheriting classes
 
85
        /// Inheriting classes if they give extra important info
82
86
        /// </summary>
83
87
        public virtual IEnumerable<IResult> Results
84
88
        {