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
- StylusButtonEventArgs.cs
- UxThemeWrapper.cs
- PrintDialog.cs
- GB18030Encoding.cs
- SignatureDescription.cs
- PowerStatus.cs
- RNGCryptoServiceProvider.cs
- CommandHelper.cs
- DataAccessor.cs
- DataControlPagerLinkButton.cs
- FormViewUpdatedEventArgs.cs
- BaseHashHelper.cs
- WebServiceEnumData.cs
- Rotation3DKeyFrameCollection.cs
- RowSpanVector.cs
- Menu.cs
- IDictionary.cs
- WebEvents.cs
- RequestCacheManager.cs
- DebugTracing.cs
- ObjectQueryState.cs
- DesignerCatalogPartChrome.cs
- PeerTransportSecurityElement.cs
- PointAnimationUsingPath.cs
- TextBlock.cs
- BaseInfoTable.cs
- SourceElementsCollection.cs
- CheckBoxField.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- PersonalizablePropertyEntry.cs
- OleDbPermission.cs
- Material.cs
- EmptyElement.cs
- GridViewDeletedEventArgs.cs
- RegexCapture.cs
- BezierSegment.cs
- DynamicActivityProperty.cs
- SourceSwitch.cs
- AddInAdapter.cs
- SchemaTableColumn.cs
- ConnectionsZone.cs
- DocumentPageHost.cs
- LiteralSubsegment.cs
- AttributeEmitter.cs
- _UriTypeConverter.cs
- NTAccount.cs
- XamlFilter.cs
- Stylesheet.cs
- MemoryPressure.cs
- EncodingFallbackAwareXmlTextWriter.cs
- TreeViewImageGenerator.cs
- SchemaConstraints.cs
- XmlSerializableWriter.cs
- LineUtil.cs
- TransformerInfo.cs
- GridViewDeletedEventArgs.cs
- Lasso.cs
- OdbcTransaction.cs
- SplashScreen.cs
- unsafenativemethodstextservices.cs
- Point3DAnimationUsingKeyFrames.cs
- ManualResetEvent.cs
- ViewLoader.cs
- DBPropSet.cs
- CurrencyWrapper.cs
- PermissionSet.cs
- SortedDictionary.cs
- ErrorRuntimeConfig.cs
- XXXOnTypeBuilderInstantiation.cs
- Directory.cs
- ContextStack.cs
- HitTestWithPointDrawingContextWalker.cs
- Block.cs
- TransactionFlowBindingElementImporter.cs
- Clause.cs
- CapabilitiesUse.cs
- ConstraintManager.cs
- ClientSettings.cs
- SymDocumentType.cs
- InlineCollection.cs
- WebHttpSecurity.cs
- UpDownBaseDesigner.cs
- TextDecoration.cs
- EventOpcode.cs
- InstanceLockLostException.cs
- SQLBoolean.cs
- KeyboardDevice.cs
- UserControlParser.cs
- RoleServiceManager.cs
- X509Chain.cs
- SubqueryRules.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ItemList.cs
- SqlVersion.cs
- RMEnrollmentPage2.cs
- RoutingEndpointTrait.cs
- TextServicesPropertyRanges.cs
- MoveSizeWinEventHandler.cs
- DefaultTraceListener.cs
- DelegateTypeInfo.cs