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,85 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="WebPartDescription.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.UI.WebControls.WebParts {
|
||||
|
||||
using System;
|
||||
|
||||
public class WebPartDescription {
|
||||
|
||||
private string _id;
|
||||
private string _title;
|
||||
private string _description;
|
||||
private string _imageUrl;
|
||||
private WebPart _part;
|
||||
|
||||
private WebPartDescription() {
|
||||
}
|
||||
|
||||
public WebPartDescription(string id, string title, string description, string imageUrl) {
|
||||
if (String.IsNullOrEmpty(id)) {
|
||||
throw new ArgumentNullException("id");
|
||||
}
|
||||
if (String.IsNullOrEmpty(title)) {
|
||||
throw new ArgumentNullException("title");
|
||||
}
|
||||
_id = id;
|
||||
_title = title;
|
||||
_description = (description != null) ? description : String.Empty;
|
||||
_imageUrl = (imageUrl != null) ? imageUrl : String.Empty;
|
||||
}
|
||||
|
||||
public WebPartDescription(WebPart part) {
|
||||
string id = part.ID;
|
||||
if (String.IsNullOrEmpty(id)) {
|
||||
throw new ArgumentException(SR.GetString(SR.WebPartManager_NoWebPartID), "part");
|
||||
}
|
||||
|
||||
_id = id;
|
||||
|
||||
string displayTitle = part.DisplayTitle;
|
||||
_title = (displayTitle != null) ? displayTitle : String.Empty;
|
||||
|
||||
string description = part.Description;
|
||||
_description = (description != null) ? description : String.Empty;
|
||||
|
||||
string imageUrl = part.CatalogIconImageUrl;
|
||||
_imageUrl = (imageUrl != null) ? imageUrl : String.Empty;
|
||||
|
||||
_part = part;
|
||||
}
|
||||
|
||||
public string CatalogIconImageUrl {
|
||||
get {
|
||||
return _imageUrl;
|
||||
}
|
||||
}
|
||||
|
||||
public string Description {
|
||||
get {
|
||||
return _description;
|
||||
}
|
||||
}
|
||||
|
||||
public string ID {
|
||||
get {
|
||||
return _id;
|
||||
}
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get {
|
||||
return _title;
|
||||
}
|
||||
}
|
||||
|
||||
internal WebPart WebPart {
|
||||
get {
|
||||
return _part;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user