Files
mono/mcs/class/System.Data/System.Data.Common/DbDataPermission.cs
T
Daniel Morgan aafe0b2af2 2002-05-18 Daniel Morgan <[email protected]>
* System.Data.build: took out all excluded
	files except the ones in the Test directory
	because all files compile now.  It does not
	mean they all work or have implementations
	though.

	* System.Data/DataRelationCollection.cs
	* System.Data/DataTableRelationCollection.cs
	* System.Data/InternalDataCollectionBase.cs
	* System.Data.Common/DbDataPermission.cs
	* System.Data.SqlClient/SqlInfoMessageEventArgs.cs
	* System.Data.SqlClient/SqlClientPermission.cs
	* System.Data.SqlClient/SqlClientPermissionAttribute.cs: changes
	to get all System.Data* files to compile.

	* System.Data.SqlClient/SqlCommand.cs: started coding
	to prevent SqlConnection and SqlCommand from doing
	anyting while fetching data using SqlDataReader.  Also,
	started coding to undo this prevention once the
	SqlDataReader is closed.

	* System.Data.SqlClient/SqlConnection.cs: get database server
	version.  Started coding to prevent connection from
	doing anything while fetching data and undo once the reader
	is closed.  Include events SqlInfoMessage and StateChange.

	* System.Data.SqlClient/SqlDataReader.cs: start coding to
	prevent connection and command from doing anything while
	fetching data, and undo when closed.

	* Test/PostgresTest.cs: added test to get ServerVersion
	property from SqlConnection

svn path=/trunk/mcs/; revision=4742
2002-05-18 13:20:24 +00:00

84 lines
1.8 KiB
C#

//
// System.Data.Common.DbDataAdapter.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Security;
using System.Security.Permissions;
namespace System.Data.Common
{
/// <summary>
/// Provides the capability for a .NET data provider to ensure that a user has a security level adequate for accessing data.
/// </summary>
public abstract class DBDataPermission : CodeAccessPermission,
IUnrestrictedPermission
{
private bool allowBlankPassword;
private PermissionState permissionState;
protected DBDataPermission () {
allowBlankPassword = false;
permissionState = PermissionState.None;
}
protected DBDataPermission (PermissionState state) {
allowBlankPassword = false;
permissionState = state;
}
public DBDataPermission (PermissionState state, bool abp) {
allowBlankPassword = abp;
permissionState = state;
}
public override IPermission Copy () {
throw new NotImplementedException ();
}
[MonoTODO]
public override void FromXml (SecurityElement securityElement) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Intersect (IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsSubsetOf (IPermission target) {
throw new NotImplementedException ();
}
public bool IsUnrestricted () {
if (permissionState == PermissionState.Unrestricted)
return true;
return false;
}
[MonoTODO]
public override SecurityElement ToXml () {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Union (IPermission target) {
throw new NotImplementedException ();
}
public bool AllowBlankPassword {
get {
return allowBlankPassword;
}
set {
allowBlankPassword = value;
}
}
}
}