public void WriteOptions(IFileMirrorOptions options) { this.WriteLine("{0}: {1}", CommandTokens.LOCAL_ROOT, options.LocalRootPath); this.WriteLine("{0}: {1}", CommandTokens.REMOTE_HOST, options.RemoteHost); this.WriteLine("{0}: {1}", CommandTokens.REMOTE_USER, options.RemoteUsername); this.WriteLine("{0}: {1}", CommandTokens.REMOTE_ROOT, options.RemoteRootPath); }
public FileMirrorOptionsControl(IFileMirrorOptions fileMirrorOptions) { InitializeComponent(); this.FileMirrorOptions = fileMirrorOptions; this.DataContext = fileMirrorOptions; this.LostKeyboardFocus += FileMirrorOptionsControl_LostKeyboardFocus; }
public CommandService( IConsole console, IFileMirrorOptions options, IFilePathService filePathService) { this.Console = console; this.Options = options; this.FilePathService = filePathService; }
public static string ReplaceTokens( string parameterizedCmd, string localFullFilePath, string remoteFullFilePath, IFileMirrorOptions options) { string cmd = parameterizedCmd .Replace(CommandTokens.LOCAL_ROOT, options.LocalRootPath) .Replace(CommandTokens.LOCAL_FILE, localFullFilePath) .Replace(CommandTokens.LOCAL_FILE_NOX, RemoveExtension(localFullFilePath)) .Replace(CommandTokens.LOCAL_FILE_DIR, GetDirectoryPath(localFullFilePath, '\\')) .Replace(CommandTokens.REMOTE_HOST, options.RemoteHost) .Replace(CommandTokens.REMOTE_USER, options.RemoteUsername) .Replace(CommandTokens.REMOTE_ROOT, options.RemoteRootPath) .Replace(CommandTokens.REMOTE_FILE, remoteFullFilePath) .Replace(CommandTokens.REMOTE_FILE_NOX, RemoveExtension(remoteFullFilePath)) .Replace(CommandTokens.REMOTE_FILE_DIR, GetDirectoryPath(remoteFullFilePath, options.RemotePathSeparatorCharacter)); return(cmd); }
public FilePathService(IFileMirrorOptions options) { this.Options = options; }