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
- TimeSpanConverter.cs
- ReadWriteObjectLock.cs
- SqlMethods.cs
- JapaneseLunisolarCalendar.cs
- ObjectDataSourceView.cs
- FrameworkReadOnlyPropertyMetadata.cs
- BasePattern.cs
- IntSecurity.cs
- DrawingBrush.cs
- XPathItem.cs
- NonClientArea.cs
- ScrollItemPatternIdentifiers.cs
- GrammarBuilderWildcard.cs
- Block.cs
- EmptyStringExpandableObjectConverter.cs
- AuthStoreRoleProvider.cs
- Win32MouseDevice.cs
- OAVariantLib.cs
- Matrix3D.cs
- X509Utils.cs
- ConfigurationProperty.cs
- SourceFilter.cs
- Message.cs
- ToolStripMenuItemDesigner.cs
- TimerEventSubscriptionCollection.cs
- ThreadStateException.cs
- XmlSchemaComplexContentExtension.cs
- SessionStateUtil.cs
- PolyBezierSegment.cs
- CodeNamespace.cs
- ImageDesigner.cs
- AssemblySettingAttributes.cs
- KeyTimeConverter.cs
- WebPartDescription.cs
- ParallelEnumerable.cs
- PackagePart.cs
- ParentControlDesigner.cs
- BrowserInteropHelper.cs
- StringBuilder.cs
- EmptyCollection.cs
- URI.cs
- BridgeDataReader.cs
- CodeIndexerExpression.cs
- FrameworkContentElementAutomationPeer.cs
- QueryGeneratorBase.cs
- EditorAttribute.cs
- HttpCapabilitiesBase.cs
- Pool.cs
- TripleDES.cs
- BinaryWriter.cs
- SqlDataSourceCommandEventArgs.cs
- TableAdapterManagerGenerator.cs
- TreeNodeEventArgs.cs
- TypeConverters.cs
- PolicyUnit.cs
- OutputCacheSettings.cs
- ProjectionPruner.cs
- ConstructorNeedsTagAttribute.cs
- BindingContext.cs
- ListViewTableRow.cs
- PieceDirectory.cs
- RawStylusInputCustomData.cs
- OdbcCommandBuilder.cs
- SafeNativeMethods.cs
- unsafenativemethodstextservices.cs
- HorizontalAlignConverter.cs
- ClientCredentialsSecurityTokenManager.cs
- WindowCollection.cs
- PersonalizationProvider.cs
- SspiHelper.cs
- BitmapEffectGroup.cs
- AssociationType.cs
- RolePrincipal.cs
- SamlDelegatingWriter.cs
- ServiceHttpHandlerFactory.cs
- CompareValidator.cs
- AsymmetricCryptoHandle.cs
- MailDefinition.cs
- PlainXmlSerializer.cs
- VectorCollectionConverter.cs
- Update.cs
- TimeZone.cs
- ActiveXContainer.cs
- LayoutEngine.cs
- WS2007HttpBindingElement.cs
- WebReferencesBuildProvider.cs
- NumericUpDownAcceleration.cs
- DocumentXPathNavigator.cs
- TrackBar.cs
- ECDsaCng.cs
- WbemException.cs
- TextContainerChangeEventArgs.cs
- ActivationArguments.cs
- DomainUpDown.cs
- SqlGatherConsumedAliases.cs
- UnmanagedHandle.cs
- StyleHelper.cs
- GeometryModel3D.cs
- DataGridItem.cs
- StrongNameHelpers.cs