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
- Error.cs
- PassportAuthentication.cs
- SafeArrayRankMismatchException.cs
- _PooledStream.cs
- Monitor.cs
- FacetDescription.cs
- CodeTypeDeclaration.cs
- TextBounds.cs
- UInt32Converter.cs
- MethodCallTranslator.cs
- WebPartActionVerb.cs
- CodeTryCatchFinallyStatement.cs
- TextFormatter.cs
- BamlLocalizableResourceKey.cs
- DES.cs
- ScrollProperties.cs
- DispatcherFrame.cs
- printdlgexmarshaler.cs
- XmlSerializableWriter.cs
- BindingExpressionBase.cs
- EntityDataSourceContextDisposingEventArgs.cs
- DoubleAnimationBase.cs
- LabelEditEvent.cs
- EventKeyword.cs
- UTF8Encoding.cs
- HttpProfileBase.cs
- MimeParameter.cs
- ShapeTypeface.cs
- Matrix.cs
- RoleService.cs
- HtmlForm.cs
- CodeCompiler.cs
- QilInvokeLateBound.cs
- HttpWrapper.cs
- PropertyToken.cs
- CssStyleCollection.cs
- InternalBufferManager.cs
- Trustee.cs
- CellIdBoolean.cs
- CodeConditionStatement.cs
- LayoutTableCell.cs
- WebPartHelpVerb.cs
- _OverlappedAsyncResult.cs
- DbConnectionOptions.cs
- NameValueConfigurationCollection.cs
- PrivacyNoticeBindingElementImporter.cs
- SafeNativeMethods.cs
- DynamicResourceExtension.cs
- TextEditorCopyPaste.cs
- CryptoConfig.cs
- StringResourceManager.cs
- Matrix3D.cs
- RepeatButton.cs
- BufferedWebEventProvider.cs
- InputLanguageProfileNotifySink.cs
- arabicshape.cs
- SchemaEntity.cs
- BuildProviderCollection.cs
- DispatcherFrame.cs
- MetadataExchangeBindings.cs
- WebPartDisplayModeCollection.cs
- TrackBarDesigner.cs
- SequentialUshortCollection.cs
- DataGridViewControlCollection.cs
- CodeNamespaceCollection.cs
- AlternateView.cs
- DBAsyncResult.cs
- SafeFileMappingHandle.cs
- RegexTree.cs
- StandardCommandToolStripMenuItem.cs
- EntryPointNotFoundException.cs
- UnsafeNativeMethodsPenimc.cs
- ClassGenerator.cs
- MultiByteCodec.cs
- TemplateXamlTreeBuilder.cs
- VisualProxy.cs
- StreamResourceInfo.cs
- IProvider.cs
- KerberosSecurityTokenProvider.cs
- PanningMessageFilter.cs
- HashHelper.cs
- XmlSchemaValidator.cs
- ButtonFlatAdapter.cs
- ClockController.cs
- WpfKnownTypeInvoker.cs
- FolderLevelBuildProvider.cs
- WsatTransactionHeader.cs
- ProtocolsConfiguration.cs
- PaintValueEventArgs.cs
- ObjectStateEntry.cs
- StatusBarItem.cs
- EventLogPermission.cs
- CallbackValidator.cs
- XmlSerializerAssemblyAttribute.cs
- WizardPanel.cs
- CodeCommentStatementCollection.cs
- LabelEditEvent.cs
- TextDecorationCollectionConverter.cs
- SchemaImporterExtension.cs
- UIElement.cs