Code:
/ FX-1434 / FX-1434 / 1.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
- AutomationProperties.cs
- LiteralLink.cs
- StringFormat.cs
- COM2ComponentEditor.cs
- JoinCqlBlock.cs
- ListViewGroupCollectionEditor.cs
- OleDbRowUpdatingEvent.cs
- CategoryAttribute.cs
- DeclarativeCatalogPart.cs
- HMAC.cs
- EntitySetBase.cs
- HtmlTableCellCollection.cs
- EntityDataSourceColumn.cs
- TileModeValidation.cs
- TrustSection.cs
- BufferAllocator.cs
- DataContractAttribute.cs
- TabControl.cs
- securitycriticaldataformultiplegetandset.cs
- COM2Enum.cs
- MimeObjectFactory.cs
- BoundsDrawingContextWalker.cs
- RegexWriter.cs
- SessionState.cs
- AsymmetricKeyExchangeDeformatter.cs
- DefaultTraceListener.cs
- SortedSet.cs
- OleDbRowUpdatingEvent.cs
- X509ChainPolicy.cs
- SqlUtil.cs
- CellRelation.cs
- DependencyPropertyChangedEventArgs.cs
- MeasureData.cs
- WorkflowDesigner.cs
- AttributeSetAction.cs
- CompilerGeneratedAttribute.cs
- EventLogPermission.cs
- DelegatingTypeDescriptionProvider.cs
- ZoneButton.cs
- ConnectionProviderAttribute.cs
- ConditionCollection.cs
- PermissionSetTriple.cs
- HttpModuleAction.cs
- TableHeaderCell.cs
- TextEditorLists.cs
- ColumnTypeConverter.cs
- NamespaceInfo.cs
- DbQueryCommandTree.cs
- StringReader.cs
- PropertyRef.cs
- TabControlToolboxItem.cs
- HttpProcessUtility.cs
- ProtocolsConfigurationEntry.cs
- DesignTimeTemplateParser.cs
- MenuCommand.cs
- TransportContext.cs
- EventListener.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- StylusDownEventArgs.cs
- SrgsToken.cs
- _ConnectOverlappedAsyncResult.cs
- DependencyPropertyKind.cs
- Grammar.cs
- Logging.cs
- BufferedReadStream.cs
- Verify.cs
- RegexRunnerFactory.cs
- DeferredReference.cs
- DataGridViewImageColumn.cs
- WebException.cs
- NullReferenceException.cs
- XmlByteStreamReader.cs
- SortKey.cs
- ListBindingHelper.cs
- CharacterBufferReference.cs
- CasesDictionary.cs
- CompiledIdentityConstraint.cs
- ObjectSet.cs
- XmlArrayAttribute.cs
- CatalogZoneDesigner.cs
- XsdBuildProvider.cs
- EventSetter.cs
- TypeLibraryHelper.cs
- Hyperlink.cs
- ObjectStateManagerMetadata.cs
- TextTreeInsertElementUndoUnit.cs
- ServiceModelExtensionCollectionElement.cs
- RequestQueue.cs
- TableCellCollection.cs
- DataTableTypeConverter.cs
- XmlSerializerFactory.cs
- Restrictions.cs
- ColorContextHelper.cs
- GeometryConverter.cs
- ConditionCollection.cs
- XPathNodeInfoAtom.cs
- DataPagerCommandEventArgs.cs
- BooleanKeyFrameCollection.cs
- CapiNative.cs