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
- ParamArrayAttribute.cs
- ComMethodElement.cs
- CallbackException.cs
- BinaryFormatterSinks.cs
- PenThread.cs
- ResourcesChangeInfo.cs
- CodeDomSerializationProvider.cs
- XmlAttribute.cs
- BinaryReader.cs
- PlatformCulture.cs
- Table.cs
- WindowsSolidBrush.cs
- XmlNodeComparer.cs
- EntityDesignerUtils.cs
- EventRouteFactory.cs
- Publisher.cs
- WebException.cs
- ValidatedControlConverter.cs
- ErrorHandlerModule.cs
- recordstate.cs
- InputEventArgs.cs
- WindowsListViewGroup.cs
- MonitorWrapper.cs
- GenericIdentity.cs
- CombinedGeometry.cs
- Int32RectConverter.cs
- IndependentAnimationStorage.cs
- XmlRawWriterWrapper.cs
- SwitchLevelAttribute.cs
- XPathNavigator.cs
- ClientTargetSection.cs
- BypassElement.cs
- ValidationSummary.cs
- ConfigsHelper.cs
- LongMinMaxAggregationOperator.cs
- ToolBarDesigner.cs
- DeviceSpecificDesigner.cs
- NativeMethods.cs
- BindableTemplateBuilder.cs
- EntityParameterCollection.cs
- Model3D.cs
- BitmapEncoder.cs
- COM2Properties.cs
- ProxyHwnd.cs
- ClientRuntime.cs
- safesecurityhelperavalon.cs
- ErrorRuntimeConfig.cs
- HttpResponseInternalWrapper.cs
- ColorConvertedBitmap.cs
- SQLBytes.cs
- ConfigPathUtility.cs
- AutomationFocusChangedEventArgs.cs
- WorkflowRuntimeSection.cs
- FrameworkElementFactoryMarkupObject.cs
- XsdDuration.cs
- XamlDesignerSerializationManager.cs
- DeobfuscatingStream.cs
- xml.cs
- Profiler.cs
- ArrayConverter.cs
- SrgsRuleRef.cs
- CellQuery.cs
- FileSystemInfo.cs
- TagMapInfo.cs
- Effect.cs
- MemberRelationshipService.cs
- ThousandthOfEmRealDoubles.cs
- MultiTrigger.cs
- ItemMap.cs
- FontNamesConverter.cs
- OrderedDictionaryStateHelper.cs
- PageHandlerFactory.cs
- ConfigurationStrings.cs
- ToolStripPanel.cs
- RegexMatch.cs
- QEncodedStream.cs
- LoginUtil.cs
- COAUTHINFO.cs
- SqlWebEventProvider.cs
- OdbcDataReader.cs
- CreatingCookieEventArgs.cs
- PermissionToken.cs
- ExtenderControl.cs
- Serializer.cs
- CqlQuery.cs
- ImageAttributes.cs
- HostingPreferredMapPath.cs
- Transform.cs
- ProgressBarBrushConverter.cs
- ReflectTypeDescriptionProvider.cs
- EditorBrowsableAttribute.cs
- UIElement3DAutomationPeer.cs
- HttpCapabilitiesSectionHandler.cs
- ConfigXmlElement.cs
- WebPart.cs
- C14NUtil.cs
- ProxyAttribute.cs
- NextPreviousPagerField.cs
- SqlCacheDependencyDatabase.cs
- DataControlImageButton.cs