Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartDescription.cs / 1 / WebPartDescription.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
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;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControllableStoryboardAction.cs
- WsdlInspector.cs
- compensatingcollection.cs
- ElementHostAutomationPeer.cs
- SqlReorderer.cs
- OrthographicCamera.cs
- AQNBuilder.cs
- CatalogPart.cs
- WindowsListViewItemCheckBox.cs
- HttpWriter.cs
- StructureChangedEventArgs.cs
- wmiutil.cs
- TemplateEditingFrame.cs
- BeginStoryboard.cs
- AnnotationObservableCollection.cs
- SynchronizedInputProviderWrapper.cs
- XmlLanguage.cs
- LocatorPart.cs
- XmlSerializationGeneratedCode.cs
- TemplateContainer.cs
- RealizationDrawingContextWalker.cs
- EncoderNLS.cs
- PeerPresenceInfo.cs
- XomlCompilerParameters.cs
- ExceptionHandlerDesigner.cs
- SqlUserDefinedAggregateAttribute.cs
- IDReferencePropertyAttribute.cs
- MetadataCacheItem.cs
- PropertyNames.cs
- SafeBitVector32.cs
- FilteredAttributeCollection.cs
- IgnoreFlushAndCloseStream.cs
- SslStream.cs
- FontTypeConverter.cs
- PreservationFileWriter.cs
- EncodingNLS.cs
- ObjectQueryProvider.cs
- DispatcherProcessingDisabled.cs
- XPathDocumentNavigator.cs
- Guid.cs
- AssociationTypeEmitter.cs
- InterleavedZipPartStream.cs
- CryptoHelper.cs
- SqlDataSourceSummaryPanel.cs
- FontSourceCollection.cs
- InternalConfigRoot.cs
- ExpressionTextBox.xaml.cs
- StringAnimationUsingKeyFrames.cs
- SiteMapNode.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- WebPartDisplayMode.cs
- WasNotInstalledException.cs
- PenContexts.cs
- BinaryUtilClasses.cs
- SystemResources.cs
- ActivityDesigner.cs
- SimpleRecyclingCache.cs
- ProviderCollection.cs
- DataRowView.cs
- BitVector32.cs
- DataServiceQueryProvider.cs
- PreviewKeyDownEventArgs.cs
- SimpleApplicationHost.cs
- WindowsRichEditRange.cs
- Size3DValueSerializer.cs
- InstanceKeyCollisionException.cs
- ControlEvent.cs
- XmlStreamStore.cs
- Lease.cs
- NetworkStream.cs
- SiteOfOriginPart.cs
- RelationshipType.cs
- Viewport3DVisual.cs
- RubberbandSelector.cs
- AssemblyInfo.cs
- TextTreeObjectNode.cs
- PathFigure.cs
- Error.cs
- ListSourceHelper.cs
- EventMap.cs
- DataTransferEventArgs.cs
- DataGridColumn.cs
- InternalTypeHelper.cs
- DrawingAttributes.cs
- GPPOINT.cs
- Soap.cs
- LongPath.cs
- FontEmbeddingManager.cs
- LogicalMethodInfo.cs
- SemanticValue.cs
- WorkflowMessageEventHandler.cs
- Cloud.cs
- CommandHelper.cs
- BeginEvent.cs
- RunClient.cs
- InvokeHandlers.cs
- VScrollProperties.cs
- JpegBitmapDecoder.cs
- Tag.cs
- BaseTemplateCodeDomTreeGenerator.cs