CmisSync.Lib.PathMatcher.PathMatcher.PathMatcher C# (CSharp) Méthode

PathMatcher() public méthode

Initializes a new instance of the PathMatcher class.
public PathMatcher ( string localTargetRootPath, string remoteTargetRootPath ) : System
localTargetRootPath string Local target root path.
remoteTargetRootPath string Remote target root path.
Résultat System
        public PathMatcher(string localTargetRootPath, string remoteTargetRootPath)
        {
            if (string.IsNullOrEmpty(localTargetRootPath)) {
                throw new ArgumentException("Given local path is null or empty");
            }

            if (string.IsNullOrEmpty(remoteTargetRootPath)) {
                throw new ArgumentException("Given remote path is null or empty");
            }

            if (!localTargetRootPath.EndsWith(Path.DirectorySeparatorChar.ToString())) {
                localTargetRootPath += Path.DirectorySeparatorChar.ToString();
            }

            if (!remoteTargetRootPath.EndsWith("/")) {
                remoteTargetRootPath += "/";
            }

            this.LocalTargetRootPath = localTargetRootPath;
            this.RemoteTargetRootPath = remoteTargetRootPath;
        }