Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// 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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PlanCompiler.cs
- FileCodeGroup.cs
- ListBoxAutomationPeer.cs
- SortDescription.cs
- Base64Stream.cs
- InputDevice.cs
- BindingFormattingDialog.cs
- PointCollection.cs
- HttpWriter.cs
- DefaultShape.cs
- RIPEMD160.cs
- PenLineJoinValidation.cs
- DataGridViewRowConverter.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- Opcode.cs
- WebDescriptionAttribute.cs
- Rfc2898DeriveBytes.cs
- JapaneseLunisolarCalendar.cs
- SeekStoryboard.cs
- DES.cs
- FileUtil.cs
- BitmapEffect.cs
- ThreadInterruptedException.cs
- LabelAutomationPeer.cs
- TextTreePropertyUndoUnit.cs
- TypeAccessException.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- OutputCacheModule.cs
- EntityCommand.cs
- XmlStringTable.cs
- UriSection.cs
- Form.cs
- CorrelationTokenTypeConvertor.cs
- WindowsNonControl.cs
- FilteredReadOnlyMetadataCollection.cs
- WSUtilitySpecificationVersion.cs
- Wildcard.cs
- EventRecordWrittenEventArgs.cs
- WriteableOnDemandPackagePart.cs
- ResXBuildProvider.cs
- XDRSchema.cs
- HtmlControlPersistable.cs
- COM2PropertyBuilderUITypeEditor.cs
- ArraySortHelper.cs
- MaterializeFromAtom.cs
- ListViewPagedDataSource.cs
- Image.cs
- SHA512.cs
- XmlWhitespace.cs
- UnsafeNativeMethods.cs
- DataGridRelationshipRow.cs
- FileRecordSequenceHelper.cs
- DragDropHelper.cs
- RequiredAttributeAttribute.cs
- DatePickerDateValidationErrorEventArgs.cs
- XmlSchemaParticle.cs
- Trustee.cs
- FileDialog_Vista.cs
- ResourceDescriptionAttribute.cs
- MimePart.cs
- BitmapEncoder.cs
- TextPointer.cs
- Label.cs
- IdentityModelStringsVersion1.cs
- CmsInterop.cs
- XmlDocumentViewSchema.cs
- ExpressionBuilderCollection.cs
- InstancePersistenceContext.cs
- LowerCaseStringConverter.cs
- IssuedSecurityTokenProvider.cs
- PeerNameRecordCollection.cs
- RectConverter.cs
- SafeBuffer.cs
- Bitmap.cs
- XmlSchemaSequence.cs
- DataGridCommandEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- XmlC14NWriter.cs
- PropertyTabChangedEvent.cs
- ModuleConfigurationInfo.cs
- CodeCatchClauseCollection.cs
- FixedPageProcessor.cs
- COM2Properties.cs
- ImportDesigner.xaml.cs
- UIElementPropertyUndoUnit.cs
- StringValidator.cs
- ForEachDesigner.xaml.cs
- SystemDropShadowChrome.cs
- UmAlQuraCalendar.cs
- ListViewAutomationPeer.cs
- XmlSerializerFactory.cs
- DynamicFilterExpression.cs
- Empty.cs
- ToolboxSnapDragDropEventArgs.cs
- ForwardPositionQuery.cs
- ExpressionTable.cs
- ConnectionManagementElement.cs
- SmiSettersStream.cs
- BindingContext.cs
- ItemCollection.cs