Esempio n. 1
0
        /// <summary>
        /// Resolves the specified revision.
        /// </summary>
        /// <param name="origin"></param>
        /// <param name="revision">The revision.</param>
        /// <returns></returns>
        public AnkhRevisionType Resolve(SvnOrigin origin, SharpSvn.SvnRevision revision)
        {
            if (revision == null)
            {
                throw new ArgumentNullException("revision");
            }

            foreach (IAnkhRevisionProvider p in _providers)
            {
                AnkhRevisionType r = p.Resolve(origin, revision);

                if (r != null)
                {
                    return(r);
                }
            }

            switch (revision.RevisionType)
            {
            case SvnRevisionType.Number:
                ExplicitRevisionType ert = new ExplicitRevisionType(Context, origin);
                ert.CurrentValue = revision;
                return(ert);
            }

            return(null);
        }
Esempio n. 2
0
        /// <summary>
        /// Resolves the specified revision.
        /// </summary>
        /// <param name="origin"></param>
        /// <param name="revision">The revision.</param>
        /// <returns></returns>
        public AnkhRevisionType Resolve(SvnOrigin origin, SharpSvn.SvnRevision revision)
        {
            if (revision == null)
                throw new ArgumentNullException("revision");

            foreach (IAnkhRevisionProvider p in _providers)
            {
                AnkhRevisionType r = p.Resolve(origin, revision);

                if (r != null)
                    return r;
            }

            switch (revision.RevisionType)
            {
                case SvnRevisionType.Number:
                    ExplicitRevisionType ert = new ExplicitRevisionType(Context, origin);
                    ert.CurrentValue = revision;
                    return ert;
            }

            return null;
        }
        /// <summary>
        /// Resolves the specified revision.
        /// </summary>
        /// <param name="origin"></param>
        /// <param name="revision">The revision.</param>
        /// <returns></returns>
        public VisualGitRevisionType Resolve(GitOrigin origin, GitRevision revision)
        {
            if (revision == null)
                throw new ArgumentNullException("revision");

            foreach (IVisualGitRevisionProvider p in _providers)
            {
                VisualGitRevisionType r = p.Resolve(origin, revision);

                if (r != null)
                    return r;
            }

            switch (revision.RevisionType)
            {
                case GitRevisionType.Hash:
                    ExplicitRevisionType ert = new ExplicitRevisionType(Context, origin);
                    ert.CurrentValue = revision;
                    return ert;
            }

            return null;
        }