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
- WindowCollection.cs
- StreamInfo.cs
- OleDbParameter.cs
- DocumentViewerConstants.cs
- PhysicalFontFamily.cs
- SimpleFieldTemplateFactory.cs
- ThumbButtonInfo.cs
- ExpressionBuilderContext.cs
- AsyncContentLoadedEventArgs.cs
- TextEditorMouse.cs
- DbConvert.cs
- BaseConfigurationRecord.cs
- ActivityStateQuery.cs
- StreamResourceInfo.cs
- SectionRecord.cs
- XmlSerializerAssemblyAttribute.cs
- DataTableExtensions.cs
- PathGeometry.cs
- AutomationPropertyInfo.cs
- EventPrivateKey.cs
- ByteViewer.cs
- DocumentOrderComparer.cs
- Html32TextWriter.cs
- ObjectManager.cs
- SchemaImporter.cs
- SecurityPolicySection.cs
- PeerService.cs
- BrowserCapabilitiesCompiler.cs
- XmlIgnoreAttribute.cs
- HttpCacheVary.cs
- Mapping.cs
- CodeBlockBuilder.cs
- MonitorWrapper.cs
- RelativeSource.cs
- Component.cs
- TextSpan.cs
- CookieProtection.cs
- CodeDefaultValueExpression.cs
- EncoderNLS.cs
- RelationshipEndCollection.cs
- ParseElement.cs
- XmlSchemaValidationException.cs
- EventProxy.cs
- MouseEvent.cs
- AdvancedBindingEditor.cs
- GetPageNumberCompletedEventArgs.cs
- HtmlTitle.cs
- CacheVirtualItemsEvent.cs
- ApplicationContext.cs
- PropertyChangedEventManager.cs
- HTTPNotFoundHandler.cs
- SchemaLookupTable.cs
- UrlRoutingModule.cs
- URLString.cs
- SoapFault.cs
- DeriveBytes.cs
- ByteAnimationUsingKeyFrames.cs
- WebResourceUtil.cs
- Composition.cs
- CharacterHit.cs
- HtmlElement.cs
- ArithmeticException.cs
- TextServicesCompartmentEventSink.cs
- DBCSCodePageEncoding.cs
- Stack.cs
- ListSortDescription.cs
- WsdlInspector.cs
- CustomBindingElementCollection.cs
- StylusButtonCollection.cs
- WorkflowServiceNamespace.cs
- XmlSortKeyAccumulator.cs
- ToolStripItemClickedEventArgs.cs
- shaperfactoryquerycachekey.cs
- ItemChangedEventArgs.cs
- RadioButtonStandardAdapter.cs
- OuterGlowBitmapEffect.cs
- PolyBezierSegment.cs
- AsyncContentLoadedEventArgs.cs
- WeakReadOnlyCollection.cs
- WebPageTraceListener.cs
- DataGridTemplateColumn.cs
- DropDownHolder.cs
- SmtpFailedRecipientsException.cs
- AdornedElementPlaceholder.cs
- XamlBrushSerializer.cs
- ResourceDisplayNameAttribute.cs
- ModelTreeEnumerator.cs
- InheritanceRules.cs
- TraceProvider.cs
- HtmlImage.cs
- UnsafeNativeMethods.cs
- Speller.cs
- ProjectionPlan.cs
- ExtendLockCommand.cs
- SharedPerformanceCounter.cs
- HttpRuntime.cs
- PropertyStore.cs
- Vector3DAnimationBase.cs
- FamilyTypefaceCollection.cs
- PieceNameHelper.cs