Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartDescription.cs / 1305376 / WebPartDescription.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CombinedGeometry.cs
- XmlNullResolver.cs
- GridView.cs
- TextSelectionHelper.cs
- SqlExpander.cs
- BinaryUtilClasses.cs
- SelectionChangedEventArgs.cs
- TCPClient.cs
- SecuritySessionClientSettings.cs
- BindingExpressionBase.cs
- PropertySourceInfo.cs
- Propagator.ExtentPlaceholderCreator.cs
- ItemsControlAutomationPeer.cs
- WindowsSolidBrush.cs
- ToolStripSplitButton.cs
- ToolBarButton.cs
- ItemsControlAutomationPeer.cs
- ICspAsymmetricAlgorithm.cs
- ExpanderAutomationPeer.cs
- DbParameterCollection.cs
- CodeChecksumPragma.cs
- XmlSchemaAnnotation.cs
- Rotation3D.cs
- VariantWrapper.cs
- SchemaContext.cs
- SmiMetaData.cs
- DesignTimeParseData.cs
- StyleSheetComponentEditor.cs
- TextFormatter.cs
- DrawingContextDrawingContextWalker.cs
- WebPartDescriptionCollection.cs
- WindowsGraphics2.cs
- ToolTipAutomationPeer.cs
- EmptyWorkItem.cs
- TraceFilter.cs
- AttributeParameterInfo.cs
- Renderer.cs
- InstanceDescriptor.cs
- MonikerProxyAttribute.cs
- JsonFormatMapping.cs
- TraceInternal.cs
- HuffmanTree.cs
- _CommandStream.cs
- CounterCreationData.cs
- CheckBoxStandardAdapter.cs
- ToolStripSeparatorRenderEventArgs.cs
- XamlInterfaces.cs
- PermissionToken.cs
- ArcSegment.cs
- Adorner.cs
- SortFieldComparer.cs
- CustomErrorsSection.cs
- EventLog.cs
- HttpSocketManager.cs
- SerializationSectionGroup.cs
- PointValueSerializer.cs
- SiteMap.cs
- WhileDesigner.cs
- NamedElement.cs
- TypeHelpers.cs
- Substitution.cs
- PartialList.cs
- MdiWindowListStrip.cs
- Thread.cs
- ManipulationDelta.cs
- RuntimeUtils.cs
- MasterPageCodeDomTreeGenerator.cs
- XsdBuilder.cs
- DataSourceSelectArguments.cs
- SqlError.cs
- DataGridAddNewRow.cs
- StringInfo.cs
- XamlPathDataSerializer.cs
- CallTemplateAction.cs
- ProfileManager.cs
- ConnectionInterfaceCollection.cs
- Misc.cs
- BinaryConverter.cs
- Single.cs
- XamlDesignerSerializationManager.cs
- SingleAnimationBase.cs
- CultureMapper.cs
- Stack.cs
- XmlSignificantWhitespace.cs
- DirectoryObjectSecurity.cs
- DirectionalAction.cs
- LoadItemsEventArgs.cs
- StringToken.cs
- FontSource.cs
- ResXResourceReader.cs
- CommandID.cs
- MissingMemberException.cs
- MemberProjectedSlot.cs
- XslTransform.cs
- Invariant.cs
- StrongNameMembershipCondition.cs
- RequestStatusBarUpdateEventArgs.cs
- EventLogHandle.cs
- HttpCapabilitiesBase.cs
- SamlAudienceRestrictionCondition.cs