Class MySqlPersonalizationProvider
Implementation for Personalization Provider to use web parts in ASP.NET websites.
Inheritance
Namespace: MySql.Web.Personalization
Assembly: MySql.Web.dll
Version: 9.3.0
Syntax
public class MySqlPersonalizationProvider : PersonalizationProvider
Properties
ApplicationName
Gets or sets the application name.
Declaration
public override string ApplicationName { get; set; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Methods
FindState(PersonalizationScope, PersonalizationStateQuery, Int32, Int32, out Int32)
Returns a collection of PersonalizationStateInfo objects containing administrative information regarding records in the database that match the specified criteria.
Declaration
public override PersonalizationStateInfoCollection FindState(PersonalizationScope scope, PersonalizationStateQuery query, int pageIndex, int pageSize, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
System. |
scope | The personalization scope. |
System. |
query | The set of query parameters. |
System. |
pageIndex | The index of the page. |
System. |
pageSize | The size of the page. |
System. |
totalRecords | The total number of records to return. |
Returns
Type | Description |
---|---|
System. |
Overrides
Remarks
For example, records corresponding to users named Jeff* that have been modified since January 1, 2005. Wildcard support is provider-dependent.
GetCountOfState(PersonalizationScope, PersonalizationStateQuery)
Returns the number of records in the database that match the specified criteria.
Declaration
public override int GetCountOfState(PersonalizationScope scope, PersonalizationStateQuery query)
Parameters
Type | Name | Description |
---|---|---|
System. |
scope | The personalization scope. |
System. |
query | The set of query parameters. |
Returns
Type | Description |
---|---|
System. |
Overrides
Remarks
For example, records corresponding to users named Jeff* that haven't been modified since January 1, 2005. Wildcard support is provider-dependent.
Initialize(String, NameValueCollection)
Initializes settings values for Personalization Provider.
Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the provider. |
System. |
config | A named value collection representing the configurations for this provider. |
Overrides
LoadPersonalizationBlobs(WebPartManager, String, String, ref Byte[], ref Byte[])
Retrieves personalization state as opaque blobs from the data source.
Declaration
protected override void LoadPersonalizationBlobs(WebPartManager webPartManager, string path, string userName, ref byte[] sharedDataBlob, ref byte[] userDataBlob)
Parameters
Type | Name | Description |
---|---|---|
System. |
webPartManager | The web part manager. |
System. |
path | The path indicating where to save the data. |
System. |
userName | The user name. |
System. |
sharedDataBlob | A byte array containing the user shared data to loaded. |
System. |
userDataBlob | A byte array containing the user data to be loaded. |
Overrides
Remarks
Retrieves both shared and user personalization state corresponding to a specified user and a specified page.
ResetPersonalizationBlob(WebPartManager, String, String)
Deletes personalization state corresponding to a specified user and a specified page from the database.
Declaration
protected override void ResetPersonalizationBlob(WebPartManager webPartManager, string path, string userName)
Parameters
Type | Name | Description |
---|---|---|
System. |
webPartManager | The web part manager. |
System. |
path | The path indicating where to save the data. |
System. |
userName | The user name. |
Overrides
ResetState(PersonalizationScope, String[], String[])
Deletes personalization state corresponding to the specified users and specified pages from the database.
Declaration
public override int ResetState(PersonalizationScope scope, string[] paths, string[] usernames)
Parameters
Type | Name | Description |
---|---|---|
System. |
scope | The personalization scope. |
System. |
paths | The paths indicating where to save the data. |
System. |
usernames | The user names. |
Returns
Type | Description |
---|---|
System. |
Overrides
ResetUserState(String, DateTime)
Deletes user personalization state corresponding to the specified pages and that hasn't been updated since a specified date from the database.
Declaration
public override int ResetUserState(string path, DateTime userInactiveSinceDate)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The path indicating where to retrieve the user state from. |
System. |
userInactiveSinceDate | A time and date indicating since when the user has been inactive. |
Returns
Type | Description |
---|---|
System. |
Overrides
SavePersonalizationBlob(WebPartManager, String, String, Byte[])
Writes personalization state corresponding to a specified user and a specified page as an opaque blob to the database.
Declaration
protected override void SavePersonalizationBlob(WebPartManager webPartManager, string path, string userName, byte[] dataBlob)
Parameters
Type | Name | Description |
---|---|---|
System. |
webPartManager | The web part manager. |
System. |
path | The path indicating where to save the data. |
System. |
userName | The user name. |
System. |
dataBlob | A byte array containing the data to be saved. |
Overrides
Remarks
If userName is null
, then the personalization state is shared state and is not keyed by user name.