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
- AttachedAnnotationChangedEventArgs.cs
- MimeParameters.cs
- GraphicsState.cs
- ConfigXmlDocument.cs
- IUnknownConstantAttribute.cs
- XmlSchemaInfo.cs
- NonClientArea.cs
- CodeCommentStatement.cs
- HttpListenerException.cs
- IUnknownConstantAttribute.cs
- ObjectStateFormatter.cs
- AutomationPatternInfo.cs
- Matrix3DConverter.cs
- DeclaredTypeElement.cs
- BindingMAnagerBase.cs
- Socket.cs
- FolderBrowserDialog.cs
- WmlTextBoxAdapter.cs
- DispatchOperation.cs
- TypeProvider.cs
- Baml2006Reader.cs
- ConstraintStruct.cs
- ScrollChrome.cs
- TimeEnumHelper.cs
- FormViewDeletedEventArgs.cs
- FamilyMapCollection.cs
- LineServicesCallbacks.cs
- BinaryCommonClasses.cs
- HttpRuntime.cs
- OdbcDataAdapter.cs
- DnsCache.cs
- AssemblySettingAttributes.cs
- XamlClipboardData.cs
- Console.cs
- TableProvider.cs
- HttpSocketManager.cs
- VisualBrush.cs
- ECDsa.cs
- OleCmdHelper.cs
- _FtpDataStream.cs
- UdpDiscoveryMessageFilter.cs
- InstanceBehavior.cs
- TableParaClient.cs
- DataGridViewColumnTypePicker.cs
- StaticTextPointer.cs
- BoolExpressionVisitors.cs
- EmbossBitmapEffect.cs
- ScriptReferenceEventArgs.cs
- DependencyObjectType.cs
- SystemSounds.cs
- ADConnectionHelper.cs
- Internal.cs
- TableLayout.cs
- DataTemplateSelector.cs
- OutKeywords.cs
- EntityViewGenerationAttribute.cs
- SplitterPanel.cs
- PropertyIDSet.cs
- WindowsFormsLinkLabel.cs
- InstanceCreationEditor.cs
- DataControlFieldCollection.cs
- DefaultPrintController.cs
- SelectManyQueryOperator.cs
- EventHandlersStore.cs
- TemplateControlParser.cs
- GlyphTypeface.cs
- MimeTypeMapper.cs
- SmtpClient.cs
- SQLDecimalStorage.cs
- CompareInfo.cs
- UnmanagedMemoryStreamWrapper.cs
- WindowsComboBox.cs
- UrlMappingsModule.cs
- RuleSet.cs
- ComProxy.cs
- Point3DAnimationBase.cs
- InkCanvasSelectionAdorner.cs
- GrowingArray.cs
- SymbolUsageManager.cs
- OdbcRowUpdatingEvent.cs
- ObjectStateFormatter.cs
- WebServiceMethodData.cs
- ServiceControllerDesigner.cs
- safex509handles.cs
- ConvertEvent.cs
- MimeWriter.cs
- WindowsStartMenu.cs
- _NTAuthentication.cs
- HtmlInputText.cs
- JoinTreeSlot.cs
- UpdateCompiler.cs
- ComponentResourceManager.cs
- DefaultValidator.cs
- SQLResource.cs
- AvTraceFormat.cs
- ProcessHostFactoryHelper.cs
- HashMembershipCondition.cs
- WebColorConverter.cs
- RecordManager.cs
- AllowedAudienceUriElement.cs