コード例 #1
0
 public ZsyncMakeCommand(IZsyncMake zsyncMake) {
     _zsyncMake = zsyncMake;
     IsCommand("zsyncmake", "Zsync Make handling");
     HasOption("o|overwrite", "Overwrite zsync files (recreate even if matches)", s => Overwrite = s != null);
     HasOption("t|thorough", "Check zsync files to see if they need to be re-generated",
         s => Thorough = s != null);
     HasOption("s|smart", "Use thorough only where applicable", s => Smart = s != null);
     AllowsAnyAdditionalArguments("<file or folder> (<file or folder>...)");
 }
コード例 #2
0
ファイル: PushCommand.cs プロジェクト: MaHuJa/withSIX.Desktop
        public PushCommand(IRsyncLauncher launcher, IZsyncMake zsyncMake) {
            _rsyncLauncher = launcher;
            _zsyncMake = zsyncMake;

            IsCommand("push", "Rsync Push");
            HasAdditionalArguments(2, "<source> <destination>");
            HasOption("k|key=", "Path to key", s => Key = s);
            HasOption("m|makezsync", "Make zsync files", s => MakeZsync = s != null);
            HasOption("o|overwrite", "Overwrite zsync files (recreate even if matches)", s => Overwrite = s != null);
        }
コード例 #3
0
        public Repository(IZsyncMake zsyncMake, StatusRepo statusRepo, string folder = ".") {
            Contract.Requires<ArgumentNullException>(folder != null);
            Contract.Requires<ArgumentNullException>(!string.IsNullOrWhiteSpace(folder));
            _zsyncMake = zsyncMake;
            Folder = RepoTools.GetRootedPath(folder);
            RsyncFolder = Folder.GetChildDirectoryWithName(RepoFolderName);

            if (!RsyncFolder.Exists)
                throw new Exception("Not a SixSync repository");

            ConfigFile = GetRsyncFile(ConfigFileName);
            RepoName = Folder.DirectoryName;
            StatusRepo = statusRepo;
            Output = "print";
            MultiThreadingSettings = new MultiThreadingSettings();

            LoadConfig(true);
            LoadVersions();
        }
コード例 #4
0
 public Repository(IZsyncMake zsyncMake, string folder = ".") : this(zsyncMake, new StatusRepo(), folder) {}