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
- PostBackOptions.cs
- AttributeUsageAttribute.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- UIHelper.cs
- XmlBinaryReaderSession.cs
- MemberAccessException.cs
- TableRowGroup.cs
- AccessorTable.cs
- DataGridSortCommandEventArgs.cs
- Perspective.cs
- ScrollChrome.cs
- BuildProvidersCompiler.cs
- AssemblyBuilder.cs
- SerializationFieldInfo.cs
- SafeProcessHandle.cs
- AmbientLight.cs
- String.cs
- XslException.cs
- ResourceDescriptionAttribute.cs
- CommandHelpers.cs
- DebugHandleTracker.cs
- ApplyTemplatesAction.cs
- DetailsViewPageEventArgs.cs
- ToolBarPanel.cs
- ZipPackage.cs
- CodeMemberEvent.cs
- ParameterCollection.cs
- UserControlBuildProvider.cs
- IItemContainerGenerator.cs
- BindingExpressionBase.cs
- ObjectManager.cs
- InputReportEventArgs.cs
- SupportingTokenParameters.cs
- ReadOnlyDictionary.cs
- UxThemeWrapper.cs
- TraceRecord.cs
- ActionFrame.cs
- AccessibleObject.cs
- XmlILTrace.cs
- IsolatedStorageFile.cs
- ADMembershipUser.cs
- TrackingCondition.cs
- ActivationProxy.cs
- SafeNativeMethods.cs
- StringResourceManager.cs
- FontFaceLayoutInfo.cs
- JsonDeserializer.cs
- SoapHeaderException.cs
- ValuePattern.cs
- MessageHeaderInfoTraceRecord.cs
- RequestValidator.cs
- Evidence.cs
- ExpandCollapseProviderWrapper.cs
- CompilerInfo.cs
- Preprocessor.cs
- cookiecollection.cs
- LeaseManager.cs
- StreamReader.cs
- RtType.cs
- ImmutablePropertyDescriptorGridEntry.cs
- CodeObjectCreateExpression.cs
- GeneratedView.cs
- XamlFilter.cs
- PanelStyle.cs
- sqlstateclientmanager.cs
- errorpatternmatcher.cs
- MessagePropertyVariants.cs
- TextSpanModifier.cs
- HostSecurityManager.cs
- OpenTypeLayoutCache.cs
- ProfessionalColorTable.cs
- ContentType.cs
- WaveHeader.cs
- ContextMarshalException.cs
- CommandSet.cs
- WorkBatch.cs
- ToolboxItemAttribute.cs
- SmtpException.cs
- CommonGetThemePartSize.cs
- basecomparevalidator.cs
- linebase.cs
- DataBindEngine.cs
- HitTestWithPointDrawingContextWalker.cs
- DataObjectSettingDataEventArgs.cs
- ByteStreamMessageUtility.cs
- SiteMapNode.cs
- Property.cs
- OdbcFactory.cs
- UdpUtility.cs
- LexicalChunk.cs
- Propagator.Evaluator.cs
- SchemaNames.cs
- BaseParagraph.cs
- LogLogRecordEnumerator.cs
- HttpModuleCollection.cs
- FormatterServicesNoSerializableCheck.cs
- ObjectQueryProvider.cs
- MenuCommandService.cs
- OdbcConnectionOpen.cs
- VirtualPath.cs