Exemple #1
0
        public virtual bool ValidateChanges(ChangeValidator changeValidator)
        {
            IDictionary <string, object> cur = GetCurrentRevision().GetProperties();
            IDictionary <string, object> nuu = newRev.GetProperties();

            foreach (string key in GetChangedKeys())
            {
                if (!changeValidator.ValidateChange(key, cur.Get(key), nuu.Get(key)))
                {
                    Reject(string.Format("Illegal change to '%s' property", key));
                    return(false);
                }
            }
            return(true);
        }
		public virtual bool ValidateChanges(ChangeValidator changeValidator)
		{
			IDictionary<string, object> cur = GetCurrentRevision().GetProperties();
			IDictionary<string, object> nuu = newRev.GetProperties();
			foreach (string key in GetChangedKeys())
			{
				if (!changeValidator.ValidateChange(key, cur.Get(key), nuu.Get(key)))
				{
					Reject(string.Format("Illegal change to '%s' property", key));
					return false;
				}
			}
			return true;
		}