コード例 #1
0
ファイル: SvnPathTarget.cs プロジェクト: mendix/LibSvnSharp
        public SvnPathTarget(string path, SvnRevisionType type)
            : base(new SvnRevision(type))
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (!IsNotUri(path))
            {
                throw new ArgumentException(SharpSvnStrings.ArgumentMustBeAPathNotAUri, nameof(path));
            }

            TargetPath = GetTargetPath(path);
            FullPath   = GetFullTarget(TargetPath);
        }
コード例 #2
0
ファイル: SvnRevision.cs プロジェクト: mendix/LibSvnSharp
        public SvnRevision(SvnRevisionType type)
        {
            switch (type)
            {
            case SvnRevisionType.None:
            case SvnRevisionType.Committed:
            case SvnRevisionType.Previous:
            case SvnRevisionType.Base:
            case SvnRevisionType.Working:
            case SvnRevisionType.Head:
                RevisionType = type;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type));
            }
        }