public bool GetSources(TFVersionSpec Version)
        {
            Contract.Requires(Version != null);
            Contract.Requires(this.WorkingDirectory != null);

            var getStatus = this.workspace.Get(Version.VersionSpec, GetOptions.GetAll | GetOptions.Overwrite);

            Contract.Assume(getStatus != null);
            return(getStatus.NumFailures == 0);
        }
        public IEnumerable <TFVersionSpec> VersionRange(TFVersionSpec First, TFVersionSpec Last)
        {
            Contract.Requires(First != null);
            Contract.Requires(Last != null);
            Contract.Ensures(Contract.Result <IEnumerable <TFVersionSpec> >() != null);

            var history = this.vcServer.QueryHistory("$/" + this.subPath, VersionSpec.Latest, 0, RecursionType.Full, null, First.VersionSpec, Last.VersionSpec, Int32.MaxValue, false, false);

            Contract.Assume(history != null);
            return(history.Cast <Changeset>().Select(changeSet => new TFVersionSpec(changeSet.ChangesetId)).Reverse());
        }
Esempio n. 3
0
    public bool GetSources(TFVersionSpec Version)
    {
      Contract.Requires(Version != null);
      Contract.Requires(this.WorkingDirectory != null);

      var getStatus = this.workspace.Get(Version.VersionSpec, GetOptions.GetAll | GetOptions.Overwrite);
      Contract.Assume(getStatus != null);
      return getStatus.NumFailures == 0;
    }
Esempio n. 4
0
    public IEnumerable<TFVersionSpec> VersionRange(TFVersionSpec First, TFVersionSpec Last)
    {
      Contract.Requires(First != null);
      Contract.Requires(Last != null);
      Contract.Ensures(Contract.Result<IEnumerable<TFVersionSpec>>() != null);

      var history = this.vcServer.QueryHistory("$/" + this.subPath, VersionSpec.Latest, 0, RecursionType.Full, null, First.VersionSpec, Last.VersionSpec, Int32.MaxValue, false, false);
      Contract.Assume(history != null);
      return history.Cast<Changeset>().Select(changeSet => new TFVersionSpec(changeSet.ChangesetId)).Reverse();
    }