Beispiel #1
0
        /// <summary>
        /// Determines if the specified other instance matches this instance as the same identity .
        /// </summary>
        /// <param name="other">The other tag instance.</param>
        /// <returns>True if the instances are considered to represent the same identity.</returns>
        public bool Matches(IdentityPublicTag other)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }

            if (_email != EmailAddress.Empty || other._email != EmailAddress.Empty)
            {
                return(_email == other._email);
            }
            return(_thumbprint == other._thumbprint);
        }
        public WatchedFolder(string path, IdentityPublicTag publicTag)
            : this()
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }
            if (publicTag == null)
            {
                throw new ArgumentNullException("publicTag");
            }

            Path = path.NormalizeFolderPath();
            Tag  = publicTag;
            InitializeFileWatcher();
        }