Non-Implemented Members#region Non-Implemented Members
// the following members must be implemented due to the abstract class MembershipProvider, // but not required to be functional for using the Login control. publicoverridebool ChangePassword(string username, string oldPassword, string newPassword) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridebool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverride MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridebool DeleteUser(string username, bool deleteAllRelatedData) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridebool EnablePasswordReset ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverridebool EnablePasswordRetrieval ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverride MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, outint totalRecords) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverride MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, outint totalRecords) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverride MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, outint totalRecords) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverrideint GetNumberOfUsersOnline() ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridestring GetPassword(string username, string answer) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverride MembershipUser GetUser(string username, bool userIsOnline) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverride MembershipUser GetUser(object providerUserKey, bool userIsOnline) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridestring GetUserNameByEmail(string email) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverrideint MaxInvalidPasswordAttempts ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverrideint MinRequiredNonAlphanumericCharacters ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverrideint MinRequiredPasswordLength ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverrideint PasswordAttemptWindow ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverride MembershipPasswordFormat PasswordFormat ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverridestring PasswordStrengthRegularExpression ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverridebool RequiresQuestionAndAnswer ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverridebool RequiresUniqueEmail ...{ get...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
publicoverridestring ResetPassword(string username, string answer) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridebool UnlockUser(string userName) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridevoid UpdateUser(MembershipUser user) ...{ thrownew NotSupportedException("The method or operation is not implemented."); }
publicoverridestring ApplicationName ...{ get ...{ thrownew NotSupportedException("The method or operation is not implemented."); } set ...{ thrownew NotSupportedException("The method or operation is not implemented."); } }
#endregion
}
初始化provider
providerSection = (IndexusProviderSection)WebConfigurationManager.GetSection("indexusNetSharedCache"); providerSection.Providers类型是ProviderSettingsCollection // load registered provider and point provider base to the default provider providerCollection =new IndexusProviderCollection(); ProvidersHelper.InstantiateProviders( providerSection.Providers, providerCollection, typeof(IndexusProviderBase) ); //使用所提供的设置初始化给定类型的提供程序的集合。
已初始化的提供程序的集合返回到
providerCollection providerBase = providerCollection[providerSection.DefaultProvider];