Exemplo n.º 1
0
 protected override bool ComputeTargets(FileBaseCommandVerbOptions options)
 {
     if (!base.ComputeTargets(options))
     {
         FileCommandVerbOptions localOptions = options as FileCommandVerbOptions;
         return(localOptions.All || localOptions.Tracked);
     }
     return(true);
 }
Exemplo n.º 2
0
        protected override void GetInitialList(Versionr.Status status, FileBaseCommandVerbOptions options, out List <Versionr.Status.StatusEntry> targets)
        {
            FileCommandVerbOptions localOptions = options as FileCommandVerbOptions;

            if (localOptions.All)
            {
                targets = status.Elements;
            }
            else
            {
                base.GetInitialList(status, options, out targets);
            }
        }
Exemplo n.º 3
0
        protected override IEnumerable <KeyValuePair <bool, T> > Filter <T>(IEnumerable <KeyValuePair <string, T> > input)
        {
            FileCommandVerbOptions options = FilterOptions as FileCommandVerbOptions;

            if (options.All)
            {
                foreach (var x in input.Select(x => x.Value))
                {
                    yield return(new KeyValuePair <bool, T>(false, x));
                }
                yield break;
            }
            foreach (var x in base.Filter(input))
            {
                yield return(x);
            }
        }