You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="PersonalizationState.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.UI.WebControls.WebParts {
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Util;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract class PersonalizationState {
|
||||
|
||||
private WebPartManager _webPartManager;
|
||||
private bool _dirty;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
protected PersonalizationState(WebPartManager webPartManager) {
|
||||
if (webPartManager == null) {
|
||||
throw new ArgumentNullException("webPartManager");
|
||||
}
|
||||
|
||||
_webPartManager = webPartManager;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public bool IsDirty {
|
||||
get {
|
||||
return _dirty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract bool IsEmpty {
|
||||
get;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public WebPartManager WebPartManager {
|
||||
get {
|
||||
return _webPartManager;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void ApplyWebPartPersonalization(WebPart webPart);
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void ApplyWebPartManagerPersonalization();
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void ExtractWebPartPersonalization(WebPart webPart);
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void ExtractWebPartManagerPersonalization();
|
||||
|
||||
// Returns the AuthorizationFilter string for a WebPart before it is instantiated
|
||||
// Returns null if there is no personalized value for AuthorizationFilter
|
||||
public abstract string GetAuthorizationFilter(string webPartID);
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
protected void SetDirty() {
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void SetWebPartDirty(WebPart webPart);
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public abstract void SetWebPartManagerDirty();
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
protected void ValidateWebPart(WebPart webPart) {
|
||||
if (webPart == null) {
|
||||
throw new ArgumentNullException("webPart");
|
||||
}
|
||||
|
||||
if (_webPartManager.WebParts.Contains(webPart) == false) {
|
||||
throw new ArgumentException(SR.GetString(SR.UnknownWebPart), "webPart");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user