You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -45,9 +45,9 @@ namespace System.Web.Configuration
|
||||
properties = new ConfigurationPropertyCollection();
|
||||
}
|
||||
|
||||
public void Add (AssemblyInfo info)
|
||||
public void Add (AssemblyInfo assemblyInformation)
|
||||
{
|
||||
BaseAdd (info, false);
|
||||
BaseAdd (assemblyInformation, false);
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
|
@@ -74,8 +74,8 @@ namespace System.Web.Configuration {
|
||||
set { if (BaseGet(index) != null) BaseRemoveAt(index); BaseAdd(index, value); }
|
||||
}
|
||||
|
||||
public new BufferModeSettings this [string name] {
|
||||
get { return (BufferModeSettings) BaseGet (name); }
|
||||
public new BufferModeSettings this [string key] {
|
||||
get { return (BufferModeSettings) BaseGet (key); }
|
||||
}
|
||||
|
||||
protected internal override ConfigurationPropertyCollection Properties {
|
||||
|
@@ -99,8 +99,8 @@ namespace System.Web.Configuration {
|
||||
set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
|
||||
}
|
||||
|
||||
public new EventMappingSettings this [string name] {
|
||||
get { return (EventMappingSettings) BaseGet (name); }
|
||||
public new EventMappingSettings this [string key] {
|
||||
get { return (EventMappingSettings) BaseGet (key); }
|
||||
}
|
||||
|
||||
protected internal override ConfigurationPropertyCollection Properties {
|
||||
|
@@ -48,9 +48,9 @@ namespace System.Web.Configuration
|
||||
{
|
||||
}
|
||||
|
||||
public void Add (HttpModuleAction httpModuleAction)
|
||||
public void Add (HttpModuleAction httpModule)
|
||||
{
|
||||
BaseAdd (httpModuleAction);
|
||||
BaseAdd (httpModule);
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
|
@@ -94,8 +94,8 @@ namespace System.Web.Configuration {
|
||||
BaseRemoveAt (index);
|
||||
}
|
||||
|
||||
public new ProfileSettings this [string name] {
|
||||
get { return (ProfileSettings)BaseGet (name); }
|
||||
public new ProfileSettings this [string key] {
|
||||
get { return (ProfileSettings)BaseGet (key); }
|
||||
}
|
||||
|
||||
public ProfileSettings this [int index] {
|
||||
|
@@ -51,9 +51,9 @@ namespace System.Web.Configuration
|
||||
groupSettings = new ProfileGroupSettingsCollection ();
|
||||
}
|
||||
|
||||
public override bool Equals (object obj)
|
||||
public override bool Equals (object rootProfilePropertySettingsCollection)
|
||||
{
|
||||
RootProfilePropertySettingsCollection col = obj as RootProfilePropertySettingsCollection;
|
||||
RootProfilePropertySettingsCollection col = rootProfilePropertySettingsCollection as RootProfilePropertySettingsCollection;
|
||||
if (col == null)
|
||||
return false;
|
||||
|
||||
|
@@ -94,8 +94,8 @@ namespace System.Web.Configuration {
|
||||
BaseRemoveAt (index);
|
||||
}
|
||||
|
||||
public new RuleSettings this [string name] {
|
||||
get { return (RuleSettings) BaseGet (name); }
|
||||
public new RuleSettings this [string key] {
|
||||
get { return (RuleSettings) BaseGet (key); }
|
||||
}
|
||||
|
||||
public RuleSettings this [int index] {
|
||||
|
@@ -69,9 +69,9 @@ namespace System.Web.Configuration
|
||||
this.MappedTagType = mappedTagTypeName;
|
||||
}
|
||||
|
||||
public override bool Equals (object map)
|
||||
public override bool Equals (object o)
|
||||
{
|
||||
TagMapInfo info = map as TagMapInfo;
|
||||
TagMapInfo info = o as TagMapInfo;
|
||||
if (info == null)
|
||||
return false;
|
||||
|
||||
|
@@ -99,8 +99,8 @@ namespace System.Web.Configuration {
|
||||
get { return "trustLevel"; }
|
||||
}
|
||||
|
||||
public new TrustLevel this [string name] {
|
||||
get { return (TrustLevel) BaseGet (name); }
|
||||
public new TrustLevel this [string key] {
|
||||
get { return (TrustLevel) BaseGet (key); }
|
||||
}
|
||||
|
||||
public TrustLevel this [int index] {
|
||||
|
@@ -37,8 +37,8 @@ namespace System.Web.Hosting
|
||||
public interface IAppManagerAppDomainFactory
|
||||
{
|
||||
[return: MarshalAs (UnmanagedType.Interface)]
|
||||
object Create ([In, MarshalAs(UnmanagedType.BStr)] string s,
|
||||
[In, MarshalAs(UnmanagedType.BStr)] string app_id);
|
||||
object Create ([In, MarshalAs(UnmanagedType.BStr)] string appId,
|
||||
[In, MarshalAs(UnmanagedType.BStr)] string appPath);
|
||||
void Stop ();
|
||||
}
|
||||
}
|
||||
|
@@ -33,6 +33,6 @@ namespace System.Web.Management
|
||||
{
|
||||
public interface IWebEventCustomEvaluator
|
||||
{
|
||||
bool CanFire (WebBaseEvent raised_event, RuleFiringRecord record);
|
||||
bool CanFire (WebBaseEvent raisedEvent, RuleFiringRecord record);
|
||||
}
|
||||
}
|
||||
|
@@ -36,19 +36,19 @@ namespace System.Web.Management
|
||||
object event_source;
|
||||
int event_code, event_detail_code;
|
||||
|
||||
protected WebBaseEvent (string message, object event_source, int event_code)
|
||||
protected WebBaseEvent (string message, object eventSource, int eventCode)
|
||||
{
|
||||
this.message = message;
|
||||
this.event_source = event_source;
|
||||
this.event_code = event_code;
|
||||
this.event_source = eventSource;
|
||||
this.event_code = eventCode;
|
||||
}
|
||||
|
||||
protected WebBaseEvent (string message, object event_source, int event_code, int event_detail_code)
|
||||
protected WebBaseEvent (string message, object eventSource, int eventCode, int eventDetailCode)
|
||||
{
|
||||
this.message = message;
|
||||
this.event_source = event_source;
|
||||
this.event_code = event_code;
|
||||
this.event_detail_code = event_detail_code;
|
||||
this.event_source = eventSource;
|
||||
this.event_code = eventCode;
|
||||
this.event_detail_code = eventDetailCode;
|
||||
}
|
||||
|
||||
public static WebApplicationInformation ApplicationInformation {
|
||||
@@ -116,7 +116,7 @@ namespace System.Web.Management
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static void Raise (WebBaseEvent event_raised)
|
||||
public static void Raise (WebBaseEvent eventRaised)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -126,7 +126,7 @@ namespace System.Web.Management
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual string ToString (bool include_app_info, bool include_custom_event_details)
|
||||
public virtual string ToString (bool includeAppInfo, bool includeCustomEventDetails)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@@ -37,19 +37,19 @@ namespace System.Web.Security {
|
||||
public class ActiveDirectoryMembershipProvider : MembershipProvider {
|
||||
|
||||
[MonoTODO ("Not implemented")]
|
||||
public override bool ChangePassword (string username, string oldPwd, string newPwd)
|
||||
public override bool ChangePassword (string username, string oldPassword, string newPassword)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO ("Not implemented")]
|
||||
public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
|
||||
public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO ("Not implemented")]
|
||||
public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
|
||||
public override MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
[MonoTODO ("Not implemented")]
|
||||
public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override string GetPassword (string username, string answer)
|
||||
public override string GetPassword (string username, string passwordAnswer)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override string ResetPassword (string username, string answer)
|
||||
public override string ResetPassword (string username, string passwordAnswer)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -139,7 +139,7 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
[MonoTODO("Not implemented")]
|
||||
public override bool UnlockUser (string userName)
|
||||
public override bool UnlockUser (string username)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@@ -83,12 +83,12 @@ namespace System.Web.Security
|
||||
return usr;
|
||||
}
|
||||
|
||||
public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
|
||||
public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out MembershipCreateStatus status)
|
||||
{
|
||||
return CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, null, out status);
|
||||
return CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, null, out status);
|
||||
}
|
||||
|
||||
public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
|
||||
public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
|
||||
{
|
||||
if (String.IsNullOrEmpty (username)) {
|
||||
status = MembershipCreateStatus.InvalidUserName;
|
||||
@@ -100,7 +100,7 @@ namespace System.Web.Security
|
||||
return null;
|
||||
}
|
||||
|
||||
return Provider.CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, providerUserKey, out status);
|
||||
return Provider.CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey, out status);
|
||||
}
|
||||
|
||||
public static bool DeleteUser (string username)
|
||||
@@ -221,9 +221,9 @@ namespace System.Web.Security
|
||||
return Provider.GetUser (providerUserKey, userIsOnline);
|
||||
}
|
||||
|
||||
public static string GetUserNameByEmail (string email)
|
||||
public static string GetUserNameByEmail (string emailToMatch)
|
||||
{
|
||||
return Provider.GetUserNameByEmail (email);
|
||||
return Provider.GetUserNameByEmail (emailToMatch);
|
||||
}
|
||||
|
||||
public static void UpdateUser (MembershipUser user)
|
||||
@@ -247,15 +247,15 @@ namespace System.Web.Security
|
||||
return Provider.FindUsersByEmail (emailToMatch, pageIndex, pageSize, out totalRecords);
|
||||
}
|
||||
|
||||
public static MembershipUserCollection FindUsersByName (string nameToMatch)
|
||||
public static MembershipUserCollection FindUsersByName (string usernameToMatch)
|
||||
{
|
||||
int totalRecords;
|
||||
return Provider.FindUsersByName (nameToMatch, 0, int.MaxValue, out totalRecords);
|
||||
return Provider.FindUsersByName (usernameToMatch, 0, int.MaxValue, out totalRecords);
|
||||
}
|
||||
|
||||
public static MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
public static MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
{
|
||||
return Provider.FindUsersByName (nameToMatch, pageIndex, pageSize, out totalRecords);
|
||||
return Provider.FindUsersByName (usernameToMatch, pageIndex, pageSize, out totalRecords);
|
||||
}
|
||||
|
||||
public static string ApplicationName {
|
||||
|
@@ -46,29 +46,29 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
|
||||
public static void AddUsersToRole (string [] usernames, string rolename)
|
||||
public static void AddUsersToRole (string [] usernames, string roleName)
|
||||
{
|
||||
Provider.AddUsersToRoles (usernames, new string[] {rolename});
|
||||
Provider.AddUsersToRoles (usernames, new string[] {roleName});
|
||||
}
|
||||
|
||||
public static void AddUsersToRoles (string [] usernames, string [] rolenames)
|
||||
public static void AddUsersToRoles (string [] usernames, string [] roleNames)
|
||||
{
|
||||
Provider.AddUsersToRoles (usernames, rolenames);
|
||||
Provider.AddUsersToRoles (usernames, roleNames);
|
||||
}
|
||||
|
||||
public static void AddUserToRole (string username, string rolename)
|
||||
public static void AddUserToRole (string username, string roleName)
|
||||
{
|
||||
Provider.AddUsersToRoles (new string[] {username}, new string[] {rolename});
|
||||
Provider.AddUsersToRoles (new string[] {username}, new string[] {roleName});
|
||||
}
|
||||
|
||||
public static void AddUserToRoles (string username, string [] rolenames)
|
||||
public static void AddUserToRoles (string username, string [] roleNames)
|
||||
{
|
||||
Provider.AddUsersToRoles (new string[] {username}, rolenames);
|
||||
Provider.AddUsersToRoles (new string[] {username}, roleNames);
|
||||
}
|
||||
|
||||
public static void CreateRole (string rolename)
|
||||
public static void CreateRole (string roleName)
|
||||
{
|
||||
Provider.CreateRole (rolename);
|
||||
Provider.CreateRole (roleName);
|
||||
}
|
||||
|
||||
public static void DeleteCookie ()
|
||||
@@ -91,14 +91,14 @@ namespace System.Web.Security {
|
||||
}
|
||||
}
|
||||
|
||||
public static bool DeleteRole (string rolename)
|
||||
public static bool DeleteRole (string roleName)
|
||||
{
|
||||
return Provider.DeleteRole (rolename, true);
|
||||
return Provider.DeleteRole (roleName, true);
|
||||
}
|
||||
|
||||
public static bool DeleteRole (string rolename, bool throwOnPopulatedRole)
|
||||
public static bool DeleteRole (string roleName, bool throwOnPopulatedRole)
|
||||
{
|
||||
return Provider.DeleteRole (rolename, throwOnPopulatedRole);
|
||||
return Provider.DeleteRole (roleName, throwOnPopulatedRole);
|
||||
}
|
||||
|
||||
public static string [] GetAllRoles ()
|
||||
@@ -125,51 +125,51 @@ namespace System.Web.Security {
|
||||
return Provider.GetRolesForUser (username);
|
||||
}
|
||||
|
||||
public static string [] GetUsersInRole (string rolename)
|
||||
public static string [] GetUsersInRole (string roleName)
|
||||
{
|
||||
return Provider.GetUsersInRole (rolename);
|
||||
return Provider.GetUsersInRole (roleName);
|
||||
}
|
||||
|
||||
public static bool IsUserInRole (string rolename)
|
||||
public static bool IsUserInRole (string roleName)
|
||||
{
|
||||
return IsUserInRole (CurrentUser, rolename);
|
||||
return IsUserInRole (CurrentUser, roleName);
|
||||
}
|
||||
|
||||
public static bool IsUserInRole (string username, string rolename)
|
||||
public static bool IsUserInRole (string username, string roleName)
|
||||
{
|
||||
if (String.IsNullOrEmpty (username))
|
||||
return false;
|
||||
return Provider.IsUserInRole (username, rolename);
|
||||
return Provider.IsUserInRole (username, roleName);
|
||||
}
|
||||
|
||||
public static void RemoveUserFromRole (string username, string rolename)
|
||||
public static void RemoveUserFromRole (string username, string roleName)
|
||||
{
|
||||
Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {rolename});
|
||||
Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {roleName});
|
||||
}
|
||||
|
||||
public static void RemoveUserFromRoles (string username, string [] rolenames)
|
||||
public static void RemoveUserFromRoles (string username, string [] roleNames)
|
||||
{
|
||||
Provider.RemoveUsersFromRoles (new string[] {username}, rolenames);
|
||||
Provider.RemoveUsersFromRoles (new string[] {username}, roleNames);
|
||||
}
|
||||
|
||||
public static void RemoveUsersFromRole (string [] usernames, string rolename)
|
||||
public static void RemoveUsersFromRole (string [] usernames, string roleName)
|
||||
{
|
||||
Provider.RemoveUsersFromRoles (usernames, new string[] {rolename});
|
||||
Provider.RemoveUsersFromRoles (usernames, new string[] {roleName});
|
||||
}
|
||||
|
||||
public static void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
|
||||
public static void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
|
||||
{
|
||||
Provider.RemoveUsersFromRoles (usernames, rolenames);
|
||||
Provider.RemoveUsersFromRoles (usernames, roleNames);
|
||||
}
|
||||
|
||||
public static bool RoleExists (string rolename)
|
||||
public static bool RoleExists (string roleName)
|
||||
{
|
||||
return Provider.RoleExists (rolename);
|
||||
return Provider.RoleExists (roleName);
|
||||
}
|
||||
|
||||
public static string[] FindUsersInRole (string rolename, string usernameToMatch)
|
||||
public static string[] FindUsersInRole (string roleName, string usernameToMatch)
|
||||
{
|
||||
return Provider.FindUsersInRole (rolename, usernameToMatch);
|
||||
return Provider.FindUsersInRole (roleName, usernameToMatch);
|
||||
}
|
||||
|
||||
public static string ApplicationName {
|
||||
|
@@ -122,28 +122,28 @@ namespace System.Web.Security {
|
||||
throw new ArgumentException (String.Format ("invalid format for {0}", pName));
|
||||
}
|
||||
|
||||
public override bool ChangePassword (string username, string oldPwd, string newPwd)
|
||||
public override bool ChangePassword (string username, string oldPassword, string newPassword)
|
||||
{
|
||||
if (username != null) username = username.Trim ();
|
||||
if (oldPwd != null) oldPwd = oldPwd.Trim ();
|
||||
if (newPwd != null) newPwd = newPwd.Trim ();
|
||||
if (oldPassword != null) oldPassword = oldPassword.Trim ();
|
||||
if (newPassword != null) newPassword = newPassword.Trim ();
|
||||
|
||||
CheckParam ("username", username, 256);
|
||||
CheckParam ("oldPwd", oldPwd, 128);
|
||||
CheckParam ("newPwd", newPwd, 128);
|
||||
CheckParam ("oldPassword", oldPassword, 128);
|
||||
CheckParam ("newPassword", newPassword, 128);
|
||||
|
||||
if (!CheckPassword (newPwd))
|
||||
if (!CheckPassword (newPassword))
|
||||
throw new ArgumentException (string.Format (
|
||||
"New Password invalid. New Password length minimum: {0}. Non-alphanumeric characters required: {1}.",
|
||||
MinRequiredPasswordLength,
|
||||
MinRequiredNonAlphanumericCharacters));
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
PasswordInfo pi = ValidateUsingPassword (username, oldPwd);
|
||||
PasswordInfo pi = ValidateUsingPassword (username, oldPassword);
|
||||
|
||||
if (pi != null) {
|
||||
EmitValidatingPassword (username, newPwd, false);
|
||||
string db_password = EncodePassword (newPwd, pi.PasswordFormat, pi.PasswordSalt);
|
||||
EmitValidatingPassword (username, newPassword, false);
|
||||
string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
|
||||
|
||||
DbCommand command = factory.CreateCommand ();
|
||||
command.Connection = connection;
|
||||
@@ -169,23 +169,23 @@ namespace System.Web.Security {
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
|
||||
public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
|
||||
{
|
||||
if (username != null) username = username.Trim ();
|
||||
if (newPwdQuestion != null) newPwdQuestion = newPwdQuestion.Trim ();
|
||||
if (newPwdAnswer != null) newPwdAnswer = newPwdAnswer.Trim ();
|
||||
if (newPasswordQuestion != null) newPasswordQuestion = newPasswordQuestion.Trim ();
|
||||
if (newPasswordAnswer != null) newPasswordAnswer = newPasswordAnswer.Trim ();
|
||||
|
||||
CheckParam ("username", username, 256);
|
||||
if (RequiresQuestionAndAnswer)
|
||||
CheckParam ("newPwdQuestion", newPwdQuestion, 128);
|
||||
CheckParam ("newPasswordQuestion", newPasswordQuestion, 128);
|
||||
if (RequiresQuestionAndAnswer)
|
||||
CheckParam ("newPwdAnswer", newPwdAnswer, 128);
|
||||
CheckParam ("newPasswordAnswer", newPasswordAnswer, 128);
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
PasswordInfo pi = ValidateUsingPassword (username, password);
|
||||
|
||||
if (pi != null) {
|
||||
string db_passwordAnswer = EncodePassword (newPwdAnswer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
string db_passwordAnswer = EncodePassword (newPasswordAnswer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
|
||||
DbCommand command = factory.CreateCommand ();
|
||||
command.Connection = connection;
|
||||
@@ -194,7 +194,7 @@ namespace System.Web.Security {
|
||||
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
AddParameter (command, "@UserName", username);
|
||||
AddParameter (command, "@NewPasswordQuestion", newPwdQuestion);
|
||||
AddParameter (command, "@NewPasswordQuestion", newPasswordQuestion);
|
||||
AddParameter (command, "@NewPasswordAnswer", db_passwordAnswer);
|
||||
DbParameter returnValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
|
||||
@@ -212,8 +212,8 @@ namespace System.Web.Security {
|
||||
public override MembershipUser CreateUser (string username,
|
||||
string password,
|
||||
string email,
|
||||
string pwdQuestion,
|
||||
string pwdAnswer,
|
||||
string passwordQuestion,
|
||||
string passwordAnswer,
|
||||
bool isApproved,
|
||||
object providerUserKey,
|
||||
out MembershipCreateStatus status)
|
||||
@@ -221,8 +221,8 @@ namespace System.Web.Security {
|
||||
if (username != null) username = username.Trim ();
|
||||
if (password != null) password = password.Trim ();
|
||||
if (email != null) email = email.Trim ();
|
||||
if (pwdQuestion != null) pwdQuestion = pwdQuestion.Trim ();
|
||||
if (pwdAnswer != null) pwdAnswer = pwdAnswer.Trim ();
|
||||
if (passwordQuestion != null) passwordQuestion = passwordQuestion.Trim ();
|
||||
if (passwordAnswer != null) passwordAnswer = passwordAnswer.Trim ();
|
||||
|
||||
/* some initial validation */
|
||||
if (username == null || username.Length == 0 || username.Length > 256 || username.IndexOf (',') != -1) {
|
||||
@@ -245,14 +245,14 @@ namespace System.Web.Security {
|
||||
return null;
|
||||
}
|
||||
if (RequiresQuestionAndAnswer &&
|
||||
(pwdQuestion == null ||
|
||||
pwdQuestion.Length == 0 || pwdQuestion.Length > 256)) {
|
||||
(passwordQuestion == null ||
|
||||
passwordQuestion.Length == 0 || passwordQuestion.Length > 256)) {
|
||||
status = MembershipCreateStatus.InvalidQuestion;
|
||||
return null;
|
||||
}
|
||||
if (RequiresQuestionAndAnswer &&
|
||||
(pwdAnswer == null ||
|
||||
pwdAnswer.Length == 0 || pwdAnswer.Length > 128)) {
|
||||
(passwordAnswer == null ||
|
||||
passwordAnswer.Length == 0 || passwordAnswer.Length > 128)) {
|
||||
status = MembershipCreateStatus.InvalidAnswer;
|
||||
return null;
|
||||
}
|
||||
@@ -275,7 +275,7 @@ namespace System.Web.Security {
|
||||
|
||||
password = EncodePassword (password, PasswordFormat, passwordSalt);
|
||||
if (RequiresQuestionAndAnswer)
|
||||
pwdAnswer = EncodePassword (pwdAnswer, PasswordFormat, passwordSalt);
|
||||
passwordAnswer = EncodePassword (passwordAnswer, PasswordFormat, passwordSalt);
|
||||
|
||||
/* make sure the hashed/encrypted password and
|
||||
* answer are still under 128 characters. */
|
||||
@@ -285,7 +285,7 @@ namespace System.Web.Security {
|
||||
}
|
||||
|
||||
if (RequiresQuestionAndAnswer) {
|
||||
if (pwdAnswer.Length > 128) {
|
||||
if (passwordAnswer.Length > 128) {
|
||||
status = MembershipCreateStatus.InvalidAnswer;
|
||||
return null;
|
||||
}
|
||||
@@ -307,8 +307,8 @@ namespace System.Web.Security {
|
||||
AddParameter (command, "@Password", password);
|
||||
AddParameter (command, "@PasswordSalt", passwordSalt);
|
||||
AddParameter (command, "@Email", email);
|
||||
AddParameter (command, "@PasswordQuestion", pwdQuestion);
|
||||
AddParameter (command, "@PasswordAnswer", pwdAnswer);
|
||||
AddParameter (command, "@PasswordQuestion", passwordQuestion);
|
||||
AddParameter (command, "@PasswordAnswer", passwordAnswer);
|
||||
AddParameter (command, "@IsApproved", isApproved);
|
||||
AddParameter (command, "@CurrentTimeUtc", Now);
|
||||
AddParameter (command, "@CreateDate", Now);
|
||||
@@ -429,9 +429,9 @@ namespace System.Web.Security {
|
||||
}
|
||||
}
|
||||
|
||||
public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
|
||||
{
|
||||
CheckParam ("nameToMatch", nameToMatch, 256);
|
||||
CheckParam ("usernameToMatch", usernameToMatch, 256);
|
||||
|
||||
if (pageIndex < 0)
|
||||
throw new ArgumentException ("pageIndex must be >= 0");
|
||||
@@ -449,7 +449,7 @@ namespace System.Web.Security {
|
||||
|
||||
AddParameter (command, "@PageIndex", pageIndex);
|
||||
AddParameter (command, "@PageSize", pageSize);
|
||||
AddParameter (command, "@UserNameToMatch", nameToMatch);
|
||||
AddParameter (command, "@UserNameToMatch", usernameToMatch);
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
// return value
|
||||
AddParameter (command, "@ReturnValue", ParameterDirection.ReturnValue, null);
|
||||
@@ -529,20 +529,20 @@ namespace System.Web.Security {
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetPassword (string username, string answer)
|
||||
public override string GetPassword (string username, string passwordAnswer)
|
||||
{
|
||||
if (!EnablePasswordRetrieval)
|
||||
throw new NotSupportedException ("this provider has not been configured to allow the retrieval of passwords");
|
||||
|
||||
CheckParam ("username", username, 256);
|
||||
if (RequiresQuestionAndAnswer)
|
||||
CheckParam ("answer", answer, 128);
|
||||
CheckParam ("passwordAnswer", passwordAnswer, 128);
|
||||
|
||||
PasswordInfo pi = GetPasswordInfo (username);
|
||||
if (pi == null)
|
||||
throw new ProviderException ("An error occurred while retrieving the password from the database");
|
||||
|
||||
string user_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
string user_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
string password = null;
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
@@ -790,7 +790,7 @@ namespace System.Web.Security {
|
||||
ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
|
||||
}
|
||||
|
||||
public override string ResetPassword (string username, string answer)
|
||||
public override string ResetPassword (string username, string passwordAnswer)
|
||||
{
|
||||
if (!EnablePasswordReset)
|
||||
throw new NotSupportedException ("this provider has not been configured to allow the resetting of passwords");
|
||||
@@ -798,7 +798,7 @@ namespace System.Web.Security {
|
||||
CheckParam ("username", username, 256);
|
||||
|
||||
if (RequiresQuestionAndAnswer)
|
||||
CheckParam ("answer", answer, 128);
|
||||
CheckParam ("passwordAnswer", passwordAnswer, 128);
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
|
||||
@@ -810,7 +810,7 @@ namespace System.Web.Security {
|
||||
EmitValidatingPassword (username, newPassword, false);
|
||||
|
||||
string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
|
||||
string db_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
string db_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
|
||||
|
||||
DbCommand command = factory.CreateCommand ();
|
||||
command.Connection = connection;
|
||||
|
@@ -87,7 +87,7 @@ namespace System.Web.Security
|
||||
return dbp;
|
||||
}
|
||||
|
||||
public override void AddUsersToRoles (string [] usernames, string [] rolenames)
|
||||
public override void AddUsersToRoles (string [] usernames, string [] roleNames)
|
||||
{
|
||||
Hashtable h = new Hashtable ();
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace System.Web.Security
|
||||
}
|
||||
|
||||
h = new Hashtable ();
|
||||
foreach (string r in rolenames) {
|
||||
foreach (string r in roleNames) {
|
||||
if (r == null)
|
||||
throw new ArgumentNullException ("null element in rolenames array");
|
||||
if (h.ContainsKey (r))
|
||||
@@ -119,7 +119,7 @@ namespace System.Web.Security
|
||||
command.Connection = connection;
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameter (command, "@RoleNames", String.Join (",", rolenames));
|
||||
AddParameter (command, "@RoleNames", String.Join (",", roleNames));
|
||||
AddParameter (command, "@UserNames", String.Join (",", usernames));
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
AddParameter (command, "@CurrentTimeUtc", DateTime.UtcNow);
|
||||
@@ -139,12 +139,12 @@ namespace System.Web.Security
|
||||
}
|
||||
}
|
||||
|
||||
public override void CreateRole (string rolename)
|
||||
public override void CreateRole (string roleName)
|
||||
{
|
||||
if (rolename == null)
|
||||
throw new ArgumentNullException ("rolename");
|
||||
if (roleName == null)
|
||||
throw new ArgumentNullException ("roleName");
|
||||
|
||||
if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
|
||||
if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
|
||||
throw new ArgumentException ("rolename is in invalid format");
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
@@ -154,25 +154,25 @@ namespace System.Web.Security
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
AddParameter (command, "@RoleName", rolename);
|
||||
AddParameter (command, "@RoleName", roleName);
|
||||
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
|
||||
command.ExecuteNonQuery ();
|
||||
int returnValue = (int) dbpr.Value;
|
||||
|
||||
if (returnValue == 1)
|
||||
throw new ProviderException (rolename + " already exists in the database");
|
||||
throw new ProviderException (roleName + " already exists in the database");
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool DeleteRole (string rolename, bool throwOnPopulatedRole)
|
||||
public override bool DeleteRole (string roleName, bool throwOnPopulatedRole)
|
||||
{
|
||||
if (rolename == null)
|
||||
throw new ArgumentNullException ("rolename");
|
||||
if (roleName == null)
|
||||
throw new ArgumentNullException ("roleName");
|
||||
|
||||
if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
|
||||
if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
|
||||
throw new ArgumentException ("rolename is in invalid format");
|
||||
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
@@ -182,7 +182,7 @@ namespace System.Web.Security
|
||||
command.Connection = connection;
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
AddParameter (command, "@RoleName", rolename);
|
||||
AddParameter (command, "@RoleName", roleName);
|
||||
AddParameter (command, "@DeleteOnlyIfRoleIsEmpty", throwOnPopulatedRole);
|
||||
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace System.Web.Security
|
||||
if (returnValue == 1)
|
||||
return false; //role does not exist
|
||||
else if (returnValue == 2 && throwOnPopulatedRole)
|
||||
throw new ProviderException (rolename + " is not empty");
|
||||
throw new ProviderException (roleName + " is not empty");
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace System.Web.Security
|
||||
}
|
||||
}
|
||||
|
||||
public override string [] GetUsersInRole (string rolename)
|
||||
public override string [] GetUsersInRole (string roleName)
|
||||
{
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
DbCommand command = factory.CreateCommand ();
|
||||
@@ -280,7 +280,7 @@ namespace System.Web.Security
|
||||
command.Connection = connection;
|
||||
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
AddParameter (command, "@RoleName", rolename);
|
||||
AddParameter (command, "@RoleName", roleName);
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
|
||||
DbDataReader reader = command.ExecuteReader ();
|
||||
@@ -327,7 +327,7 @@ namespace System.Web.Security
|
||||
ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
|
||||
}
|
||||
|
||||
public override bool IsUserInRole (string username, string rolename)
|
||||
public override bool IsUserInRole (string username, string roleName)
|
||||
{
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
DbCommand command = factory.CreateCommand ();
|
||||
@@ -335,7 +335,7 @@ namespace System.Web.Security
|
||||
command.Connection = connection;
|
||||
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
AddParameter (command, "@RoleName", rolename);
|
||||
AddParameter (command, "@RoleName", roleName);
|
||||
AddParameter (command, "@UserName", username);
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
@@ -350,7 +350,7 @@ namespace System.Web.Security
|
||||
}
|
||||
}
|
||||
|
||||
public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
|
||||
public override void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
|
||||
{
|
||||
Hashtable h = new Hashtable ();
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace System.Web.Security
|
||||
}
|
||||
|
||||
h = new Hashtable ();
|
||||
foreach (string r in rolenames) {
|
||||
foreach (string r in roleNames) {
|
||||
if (r == null)
|
||||
throw new ArgumentNullException ("null element in rolenames array");
|
||||
if (h.ContainsKey (r))
|
||||
@@ -382,7 +382,7 @@ namespace System.Web.Security
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameter (command, "@UserNames", String.Join (",", usernames));
|
||||
AddParameter (command, "@RoleNames", String.Join (",", rolenames));
|
||||
AddParameter (command, "@RoleNames", String.Join (",", roleNames));
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace System.Web.Security
|
||||
}
|
||||
}
|
||||
|
||||
public override bool RoleExists (string rolename)
|
||||
public override bool RoleExists (string roleName)
|
||||
{
|
||||
using (DbConnection connection = CreateConnection ()) {
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace System.Web.Security
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameter (command, "@ApplicationName", ApplicationName);
|
||||
AddParameter (command, "@RoleName", rolename);
|
||||
AddParameter (command, "@RoleName", roleName);
|
||||
DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
|
||||
|
||||
command.ExecuteNonQuery ();
|
||||
|
@@ -86,9 +86,9 @@ public sealed class HttpSessionState : ICollection, IEnumerable
|
||||
get { return container.IsSynchronized; }
|
||||
}
|
||||
|
||||
public object this [string key] {
|
||||
get { return container [key]; }
|
||||
set { container [key] = value; }
|
||||
public object this [string name] {
|
||||
get { return container [name]; }
|
||||
set { container [name] = value; }
|
||||
}
|
||||
|
||||
public object this [int index] {
|
||||
|
@@ -37,11 +37,11 @@ namespace System.Web.SessionState {
|
||||
{
|
||||
///methods
|
||||
void Abandon ();
|
||||
void Add (string itemName, object itemValue);
|
||||
void Add (string name, object value);
|
||||
void Clear ();
|
||||
void CopyTo (Array sessionValues, int index);
|
||||
void CopyTo (Array array, int index);
|
||||
IEnumerator GetEnumerator ();
|
||||
void Remove (string itemName);
|
||||
void Remove (string name);
|
||||
void RemoveAll ();
|
||||
void RemoveAt (int index);
|
||||
|
||||
|
@@ -41,7 +41,7 @@ namespace System.Web.SessionState {
|
||||
void Initialize ();
|
||||
bool InitializeRequest (HttpContext context, bool suppressAutoDetectRedirect, out bool supportSessionIDReissue);
|
||||
void RemoveSessionID (HttpContext context);
|
||||
void SaveSessionID (HttpContext context, string sessionID, out bool isRedirected, out bool isCookieAdded);
|
||||
void SaveSessionID (HttpContext context, string id, out bool redirected, out bool cookieAdded);
|
||||
bool Validate (string id);
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user