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
- SingleAnimationUsingKeyFrames.cs
- HandleRef.cs
- BooleanProjectedSlot.cs
- CompareValidator.cs
- ReturnValue.cs
- QuaternionConverter.cs
- FullTextState.cs
- WeakReadOnlyCollection.cs
- RuntimeConfig.cs
- InputScopeNameConverter.cs
- DecimalAnimationBase.cs
- X509Certificate.cs
- NotifyInputEventArgs.cs
- RadioButtonList.cs
- RewritingSimplifier.cs
- Thread.cs
- ScriptingRoleServiceSection.cs
- CharEnumerator.cs
- ExtendedPropertyDescriptor.cs
- EncryptedType.cs
- DropTarget.cs
- Dump.cs
- ListenDesigner.cs
- Clipboard.cs
- TransformerInfoCollection.cs
- RowsCopiedEventArgs.cs
- Control.cs
- ContentOperations.cs
- InputMethodStateTypeInfo.cs
- DataSourceHelper.cs
- ByteKeyFrameCollection.cs
- IdentifierCollection.cs
- ValidationEventArgs.cs
- StatusStrip.cs
- TransformationRules.cs
- StringPropertyBuilder.cs
- StrokeCollection2.cs
- VerificationAttribute.cs
- Vars.cs
- Vector3DCollectionConverter.cs
- DebugManager.cs
- AutomationEventArgs.cs
- SubMenuStyle.cs
- AtomServiceDocumentSerializer.cs
- DictionaryTraceRecord.cs
- DataGridViewColumnConverter.cs
- CLSCompliantAttribute.cs
- TextEditor.cs
- RedistVersionInfo.cs
- CodeComment.cs
- RenameRuleObjectDialog.Designer.cs
- Timer.cs
- Internal.cs
- SequentialWorkflowRootDesigner.cs
- RuntimeHandles.cs
- TextEditorParagraphs.cs
- RequestCache.cs
- ComponentEditorPage.cs
- SchemaNotation.cs
- EdmPropertyAttribute.cs
- CorrelationQueryBehavior.cs
- Visual3D.cs
- TraceContextEventArgs.cs
- SqlDataSourceStatusEventArgs.cs
- PersonalizationStateInfoCollection.cs
- SiteMapPath.cs
- ClientSettings.cs
- StyleTypedPropertyAttribute.cs
- CustomWebEventKey.cs
- BinaryCommonClasses.cs
- InlineObject.cs
- TextProviderWrapper.cs
- LinkConverter.cs
- KeyInterop.cs
- IdentitySection.cs
- CommonDialog.cs
- XmlWrappingReader.cs
- HMACRIPEMD160.cs
- SqlDataSourceCommandEventArgs.cs
- DocumentGrid.cs
- BevelBitmapEffect.cs
- AnchorEditor.cs
- NetStream.cs
- UnorderedHashRepartitionStream.cs
- UnknownWrapper.cs
- MatrixTransform.cs
- DirectionalLight.cs
- Util.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XmlILConstructAnalyzer.cs
- ListenerAdapter.cs
- CheckableControlBaseAdapter.cs
- ExpressionBuilder.cs
- ResourceExpressionEditor.cs
- DataGridColumn.cs
- MsmqIntegrationChannelListener.cs
- TransformDescriptor.cs
- PropertyGridEditorPart.cs
- SqlNamer.cs
- HostProtectionPermission.cs