Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebParts / CatalogPart.cs / 1 / CatalogPart.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Web.UI; ////// Provides default rendering and part selection UI /// [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.CatalogPartDesigner, " + AssemblyRef.SystemDesign), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class CatalogPart : Part { private WebPartManager _webPartManager; private CatalogZoneBase _zone; [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string DisplayTitle { get { string displayTitle = Title; if (String.IsNullOrEmpty(displayTitle)) { displayTitle = SR.GetString(SR.Part_Untitled); } return displayTitle; } } protected WebPartManager WebPartManager { get { return _webPartManager; } } protected CatalogZoneBase Zone { get { return _zone; } } public abstract WebPartDescriptionCollection GetAvailableWebPartDescriptions(); [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override IDictionary GetDesignModeState() { IDictionary state = new HybridDictionary(1); state["Zone"] = Zone; return state; } public abstract WebPart GetWebPart(WebPartDescription description); protected internal override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Zone == null) { throw new InvalidOperationException(SR.GetString(SR.CatalogPart_MustBeInZone, ID)); } } [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override void SetDesignModeState(IDictionary data) { if (data != null) { object o = data["Zone"]; if (o != null) { SetZone((CatalogZoneBase)o); } } } internal void SetWebPartManager(WebPartManager webPartManager) { _webPartManager = webPartManager; } internal void SetZone(CatalogZoneBase zone) { _zone = zone; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; using System.Web.UI; ////// Provides default rendering and part selection UI /// [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.CatalogPartDesigner, " + AssemblyRef.SystemDesign), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class CatalogPart : Part { private WebPartManager _webPartManager; private CatalogZoneBase _zone; [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string DisplayTitle { get { string displayTitle = Title; if (String.IsNullOrEmpty(displayTitle)) { displayTitle = SR.GetString(SR.Part_Untitled); } return displayTitle; } } protected WebPartManager WebPartManager { get { return _webPartManager; } } protected CatalogZoneBase Zone { get { return _zone; } } public abstract WebPartDescriptionCollection GetAvailableWebPartDescriptions(); [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override IDictionary GetDesignModeState() { IDictionary state = new HybridDictionary(1); state["Zone"] = Zone; return state; } public abstract WebPart GetWebPart(WebPartDescription description); protected internal override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Zone == null) { throw new InvalidOperationException(SR.GetString(SR.CatalogPart_MustBeInZone, ID)); } } [SecurityPermission(SecurityAction.Demand, Unrestricted = true)] protected override void SetDesignModeState(IDictionary data) { if (data != null) { object o = data["Zone"]; if (o != null) { SetZone((CatalogZoneBase)o); } } } internal void SetWebPartManager(WebPartManager webPartManager) { _webPartManager = webPartManager; } internal void SetZone(CatalogZoneBase zone) { _zone = zone; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SizeValueSerializer.cs
- CodeGenerationManager.cs
- DoWorkEventArgs.cs
- SqlNode.cs
- HandledEventArgs.cs
- DrawTreeNodeEventArgs.cs
- ColorBlend.cs
- TreeNodeSelectionProcessor.cs
- DropTarget.cs
- XmlDocumentSerializer.cs
- ButtonAutomationPeer.cs
- GridViewAutomationPeer.cs
- ReferencedCategoriesDocument.cs
- HtmlFormWrapper.cs
- smtppermission.cs
- TouchesOverProperty.cs
- FixedDocument.cs
- BinaryNode.cs
- ManifestResourceInfo.cs
- Int64Converter.cs
- Evidence.cs
- ISAPIWorkerRequest.cs
- DataControlButton.cs
- AssemblyHelper.cs
- MsmqTransportElement.cs
- FrameworkObject.cs
- EntitySetBase.cs
- SyndicationDeserializer.cs
- VideoDrawing.cs
- XXXInfos.cs
- NavigationProperty.cs
- SystemNetworkInterface.cs
- RectKeyFrameCollection.cs
- FlowDocumentPageViewerAutomationPeer.cs
- SimpleHandlerFactory.cs
- DefaultAuthorizationContext.cs
- WebPartHelpVerb.cs
- OracleParameter.cs
- ParallelQuery.cs
- ZipIOExtraFieldPaddingElement.cs
- ValidationPropertyAttribute.cs
- UserNameSecurityToken.cs
- MemberRelationshipService.cs
- MatrixTransform.cs
- FreezableOperations.cs
- CodeNamespace.cs
- WebPartManagerInternals.cs
- RichTextBox.cs
- FixedDocument.cs
- safesecurityhelperavalon.cs
- QueryAccessibilityHelpEvent.cs
- DataContext.cs
- UIElementParagraph.cs
- NumericPagerField.cs
- ServerIdentity.cs
- X509CertificateCollection.cs
- PrePostDescendentsWalker.cs
- ToolStripContextMenu.cs
- OdbcDataReader.cs
- Walker.cs
- CurrencyManager.cs
- CheckableControlBaseAdapter.cs
- DataGridViewHitTestInfo.cs
- AutoGeneratedFieldProperties.cs
- ReadOnlyMetadataCollection.cs
- HashRepartitionStream.cs
- MsmqOutputMessage.cs
- DbProviderFactory.cs
- ColumnTypeConverter.cs
- ObjectListFieldCollection.cs
- Rect3DValueSerializer.cs
- HttpListenerException.cs
- DbParameterCollectionHelper.cs
- Tracer.cs
- BinarySecretKeyIdentifierClause.cs
- RuntimeCompatibilityAttribute.cs
- ListItemCollection.cs
- LoginName.cs
- HttpWebRequest.cs
- CodeTypeOfExpression.cs
- WindowsScroll.cs
- LineSegment.cs
- ConfigurationManagerHelper.cs
- ListViewInsertionMark.cs
- XPathDocumentIterator.cs
- EmptyStringExpandableObjectConverter.cs
- ResourcePermissionBaseEntry.cs
- WebControlsSection.cs
- CachedFontFamily.cs
- SessionKeyExpiredException.cs
- ScriptControlManager.cs
- DBSchemaRow.cs
- Util.cs
- GAC.cs
- FrameworkElementAutomationPeer.cs
- StateRuntime.cs
- FacetValueContainer.cs
- BinaryNode.cs
- SecurityContextSecurityToken.cs
- DocumentationServerProtocol.cs