public RemoteData ParseSingleRemote(QueryRemoteParameters parameters, GitOutput output) { Assert.IsNotNull(parameters); Assert.IsNotNull(output); output.ThrowOnBadReturnCode(); var info = output.Output; int pos = info.IndexOf('\n') + 1; int pos2 = info.IndexOf('\n', pos); string fetchUrl = info.Substring(pos + 13, pos2 - pos - 13); pos = pos2 + 1; pos = info.IndexOf('\n', pos); string pushUrl = info.Substring(pos + 13, pos2 - pos - 13); return new RemoteData(parameters.RemoteName, fetchUrl, pushUrl); }
public Command GetQueryRemoteCommand(QueryRemoteParameters parameters) { Assert.IsNotNull(parameters); return new RemoteCommand( RemoteCommand.Show(), RemoteCommand.Cached(), new CommandParameter(parameters.RemoteName)); }