Пример #1
0
        /// <summary>
        /// Returns true if schema contains privilege with given name, otherwise false.
        /// </summary>
        /// <param name="other">Checks if this privilege is also in this schema.</param>
        /// <returns>True if schema contains privilege with given name, otherwise false.</returns>
        public bool ContainsPrivilege(PgPrivilege other)
        {
            foreach (var privilege in this.Privileges)
            {
                if (privilege.Equals(other))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #2
0
 /// <summary>
 /// Adds the given privilege to the list of privileges in this schema.
 /// </summary>
 /// <param name="privilege">The privilege which is added.</param>
 public void Add(PgPrivilege privilege)
 {
     this.Privileges.Add(privilege);
 }