Here are the examples of the csharp api class System.Data.Common.DBDataPermission.IsUnrestricted() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
6 Examples
0
1. Example
View licenseprivate void CopyFrom(DBDataPermission permission) { _isUnrestricted = permission.IsUnrestricted(); if (!_isUnrestricted) { _allowBlankPassword = permission.AllowBlankPassword; if (null != permission._keyvalues) { _keyvalues = (ArrayList) permission._keyvalues.Clone(); if (null != permission._keyvaluetree) { _keyvaluetree = permission._keyvaluetree.CopyNameValue(); } } } }
0
2. Example
View licenseprivate bool IsEmpty() { // MDAC 84804 ArrayList keyvalues = _keyvalues; bool flag = (!IsUnrestricted() && !AllowBlankPassword && ((null == keyvalues) || (0 == keyvalues.Count))); return flag; }
0
3. Example
View licenseoverride public bool IsSubsetOf(IPermission target) { if (null == target) { return IsEmpty(); } if (target.GetType() != this.GetType()) { throw ADP.PermissionTypeMismatch(); } DBDataPermission superset = (target as DBDataPermission); bool subset = superset.IsUnrestricted(); if (!subset) { if (!IsUnrestricted() && (!AllowBlankPassword || superset.AllowBlankPassword) && ((null == _keyvalues) || (null != superset._keyvaluetree))) { subset = true; if (null != _keyvalues) { foreach(DBConnectionString kventry in _keyvalues) { if(!superset._keyvaluetree.CheckValueForKeyPermit(kventry)) { subset = false; break; } } } } } return subset; }
0
4. Example
View licenseoverride public IPermission Intersect(IPermission target) { // used during Deny actions if (null == target) { return null; } if (target.GetType() != this.GetType()) { throw ADP.PermissionTypeMismatch(); } if (this.IsUnrestricted()) { // MDAC 84803, NDPWhidbey 29121 return target.Copy(); } DBDataPermission operand = (DBDataPermission) target; if (operand.IsUnrestricted()) { // NDPWhidbey 29121 return this.Copy(); } DBDataPermission newPermission = (DBDataPermission) operand.Copy(); newPermission._allowBlankPassword &= AllowBlankPassword; if ((null != _keyvalues) && (null != newPermission._keyvalues)) { newPermission._keyvalues.Clear(); newPermission._keyvaluetree.Intersect(newPermission._keyvalues, _keyvaluetree); } else { // either target.Add or this.Add have not been called // return a non-null object so IsSubset calls will fail newPermission._keyvalues = null; newPermission._keyvaluetree = null; } if (newPermission.IsEmpty()) { // no intersection, MDAC 86773 newPermission = null; } return newPermission; }
0
5. Example
View licenseoverride public SecurityElement ToXml() { Type type = this.GetType(); Securi/n ..... /n //View Source file for more details /n }
0
6. Example
View licenseoverride 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); }