mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* System.Data.Common/DbDataPermission.cs:
* System.Data.SqlClient/SqlClientPermission.cs:
Make these agree on the class status page.
* System.Data.SqlClient/SqlCommand.cs:
- Fix up handling of GUID and [Var]Binary, and Image types
* System.Data.SqlClient/SqlParameter.cs:
- Provide support for conversion between Type,
DbType, SqlDbType, and the SQL server type names.
- Fix up handling of GUID and [Var]Binary types
* System.Data.SqlClient/SqlParameterCollection.cs:
Correct all of the Add methods.
* Test/SqlTest.cs:
- Add more types to test: unique identifier, binary,
image, smalldatetime, money, smallmoney, timestamp
svn path=/trunk/mcs/; revision=9003
113 lines
2.1 KiB
C#
113 lines
2.1 KiB
C#
//
|
|
// System.Data.Common.DbDataPermission.cs
|
|
//
|
|
// Author:
|
|
// Rodrigo Moya ([email protected])
|
|
// Tim Coleman ([email protected])
|
|
//
|
|
// (C) Ximian, Inc
|
|
// Copyright (C) Tim Coleman, 2002
|
|
//
|
|
|
|
using System.Security;
|
|
using System.Security.Permissions;
|
|
|
|
namespace System.Data.Common {
|
|
[Serializable]
|
|
public abstract class DBDataPermission : CodeAccessPermission, IUnrestrictedPermission
|
|
{
|
|
#region Fields
|
|
|
|
bool allowBlankPassword;
|
|
PermissionState state;
|
|
|
|
#endregion // Fields
|
|
|
|
#region Constructors
|
|
|
|
protected DBDataPermission ()
|
|
: this (PermissionState.None, false)
|
|
{
|
|
}
|
|
|
|
protected DBDataPermission (PermissionState state)
|
|
: this (state, false)
|
|
{
|
|
}
|
|
|
|
public DBDataPermission (PermissionState state, bool allowBlankPassword)
|
|
{
|
|
this.state = state;
|
|
this.allowBlankPassword = allowBlankPassword;
|
|
}
|
|
|
|
#endregion // Constructors
|
|
|
|
#region Properties
|
|
|
|
public bool AllowBlankPassword {
|
|
get { return allowBlankPassword; }
|
|
set { allowBlankPassword = value; }
|
|
}
|
|
|
|
internal PermissionState State {
|
|
get { return state; }
|
|
set { state = value; }
|
|
}
|
|
|
|
#endregion // Properties
|
|
|
|
#region Methods
|
|
|
|
public override IPermission Copy ()
|
|
{
|
|
DBDataPermission copy = CreateInstance ();
|
|
copy.AllowBlankPassword = this.allowBlankPassword;
|
|
copy.State = this.state;
|
|
return copy;
|
|
}
|
|
|
|
protected virtual DBDataPermission CreateInstance ()
|
|
{
|
|
return (DBDataPermission) Activator.CreateInstance (this.GetType ());
|
|
}
|
|
|
|
[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 ()
|
|
{
|
|
return (state == PermissionState.Unrestricted);
|
|
}
|
|
|
|
[MonoTODO]
|
|
public override SecurityElement ToXml ()
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
[MonoTODO]
|
|
public override IPermission Union (IPermission target)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
#endregion // Methods
|
|
}
|
|
}
|