Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- BitmapData.cs
- CoTaskMemHandle.cs
- ObjectResult.cs
- UInt32.cs
- DataStreamFromComStream.cs
- TextFormatter.cs
- CellRelation.cs
- CompositeKey.cs
- SimpleBitVector32.cs
- DataBindingExpressionBuilder.cs
- WebControl.cs
- ExplicitDiscriminatorMap.cs
- SerialPort.cs
- BindingFormattingDialog.cs
- Attributes.cs
- OutputCacheProviderCollection.cs
- ReadOnlyPropertyMetadata.cs
- Point4DValueSerializer.cs
- BuildProviderCollection.cs
- SessionEndingEventArgs.cs
- SeverityFilter.cs
- SocketElement.cs
- Group.cs
- GlyphElement.cs
- SimpleModelProvider.cs
- XmlSchemaAnyAttribute.cs
- XPathItem.cs
- CallbackValidator.cs
- IApplicationTrustManager.cs
- SafeNativeMethods.cs
- StructuredTypeInfo.cs
- TextRangeAdaptor.cs
- ResXBuildProvider.cs
- ZipIOLocalFileHeader.cs
- WindowsClaimSet.cs
- AlignmentXValidation.cs
- GraphicsPathIterator.cs
- CngKeyBlobFormat.cs
- MenuItemAutomationPeer.cs
- hresults.cs
- RouteValueDictionary.cs
- DecoderBestFitFallback.cs
- DataGridViewRowCollection.cs
- CounterCreationDataCollection.cs
- CmsUtils.cs
- NamespaceInfo.cs
- COM2EnumConverter.cs
- WsatServiceCertificate.cs
- CategoriesDocument.cs
- HtmlTable.cs
- SymmetricAlgorithm.cs
- LockRecursionException.cs
- State.cs
- SecurityUtils.cs
- SecurityContextTokenValidationException.cs
- PageThemeParser.cs
- RichTextBox.cs
- MembershipSection.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ApplicationBuildProvider.cs
- XmlHelper.cs
- GradientSpreadMethodValidation.cs
- OpCodes.cs
- EllipseGeometry.cs
- SecureStringHasher.cs
- StorageEndPropertyMapping.cs
- OleDbCommandBuilder.cs
- NameNode.cs
- LoginViewDesigner.cs
- XmlBoundElement.cs
- Calendar.cs
- SqlProviderUtilities.cs
- CorePropertiesFilter.cs
- shaperfactory.cs
- SessionPageStatePersister.cs
- KeyPullup.cs
- WMICapabilities.cs
- PeerIPHelper.cs
- FormViewUpdateEventArgs.cs
- TextFormatterImp.cs
- WaitForChangedResult.cs
- SrgsItemList.cs
- MultilineStringConverter.cs
- XmlILStorageConverter.cs
- EventBuilder.cs
- ASCIIEncoding.cs
- BasicExpandProvider.cs
- FixUpCollection.cs
- XmlSchemaValidator.cs
- Stroke2.cs
- CollectionView.cs
- TreeNodeCollectionEditorDialog.cs
- StrokeNodeOperations.cs
- SetIterators.cs
- QilValidationVisitor.cs
- BindToObject.cs
- InfoCardBinaryReader.cs
- WebPartRestoreVerb.cs
- RolePrincipal.cs
- SqlNodeAnnotations.cs