System.Data.Common.DBDataPermission.AddPermissionEntry(System.Data.Common.DBConnectionString)

Here are the examples of the csharp api class System.Data.Common.DBDataPermission.AddPermissionEntry(System.Data.Common.DBConnectionString) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: referencesource
Source File: DBDataPermission.cs
View license
public virtual void Add(string connectionString, string restrictions, KeyRestrictionBehavior behavior) { // V1.0.5000
            DBConnectionString constr = new DBConnectionString(connectionString, restrictions, behavior, null, false);
            AddPermissionEntry(constr);
        }

2. Example

Project: referencesource
Source File: DBDataPermission.cs
View license
override public IPermission Union(IPermission target) {
            if (null == target) {
                return this.Copy();
            }
            if (target.GetType() != this.GetType()) {
                throw ADP.PermissionTypeMismatch();
            }
            if (IsUnrestricted()) { // MDAC 84803
                return this.Copy();
            }

            DBDataPermission newPermission = (DBDataPermission) target.Copy();
            if (!newPermission.IsUnrestricted()) {
                newPermission._allowBlankPassword |= AllowBlankPassword;

                if (null != _keyvalues) {
                    foreach(DBConnectionString entry in _keyvalues) {
                        newPermission.AddPermissionEntry(entry);
                    }
                }
            }
            return (newPermission.IsEmpty() ? null : newPermission);
        }