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
- TreeNodeStyleCollection.cs
- EditorPartCollection.cs
- CustomErrorsSectionWrapper.cs
- IImplicitResourceProvider.cs
- ExtensionWindowHeader.cs
- CompositionDesigner.cs
- CancellationTokenSource.cs
- CompoundFileStorageReference.cs
- HttpHeaderCollection.cs
- SelectedDatesCollection.cs
- CodeStatementCollection.cs
- CompleteWizardStep.cs
- ProxyHelper.cs
- WebPartConnectionsEventArgs.cs
- Group.cs
- IgnoreSectionHandler.cs
- shaper.cs
- Schema.cs
- CommandBinding.cs
- wmiprovider.cs
- PresentationSource.cs
- Ports.cs
- ProfileParameter.cs
- SafeNativeMethods.cs
- ServiceEndpointElement.cs
- OdbcDataAdapter.cs
- Int16.cs
- Comparer.cs
- PropertyValueUIItem.cs
- DPAPIProtectedConfigurationProvider.cs
- MsmqAppDomainProtocolHandler.cs
- MethodCallConverter.cs
- XmlSchemaSimpleType.cs
- SoapFault.cs
- XmlDictionaryWriter.cs
- MonitorWrapper.cs
- TablePatternIdentifiers.cs
- RawStylusInput.cs
- OutputCacheSection.cs
- SqlConnectionString.cs
- ModelItemCollection.cs
- Span.cs
- OraclePermission.cs
- QilPatternFactory.cs
- ChangePassword.cs
- EventBindingService.cs
- ThicknessAnimation.cs
- Effect.cs
- ComboBox.cs
- DataContractFormatAttribute.cs
- HTTPNotFoundHandler.cs
- ToolStripOverflow.cs
- OracleTransaction.cs
- RelationshipDetailsCollection.cs
- ControlOperationInvoker.cs
- InvariantComparer.cs
- EmptyElement.cs
- LineGeometry.cs
- XmlSchemaIdentityConstraint.cs
- FormsAuthenticationCredentials.cs
- EncoderFallback.cs
- Utility.cs
- XsltCompileContext.cs
- WeakKeyDictionary.cs
- HttpListener.cs
- SymLanguageVendor.cs
- ResourceReferenceExpression.cs
- EdmSchemaAttribute.cs
- DataAdapter.cs
- UInt32Converter.cs
- NetworkInformationPermission.cs
- ProxyFragment.cs
- DeploymentSectionCache.cs
- ApplicationDirectoryMembershipCondition.cs
- RegexCapture.cs
- Matrix.cs
- WebPartsPersonalization.cs
- KnownTypes.cs
- FragmentQueryKB.cs
- TailCallAnalyzer.cs
- HostingEnvironmentWrapper.cs
- TextDpi.cs
- UnauthorizedWebPart.cs
- EventSetter.cs
- SocketPermission.cs
- SponsorHelper.cs
- ConfigXmlDocument.cs
- TextServicesLoader.cs
- SelectionHighlightInfo.cs
- ComponentChangedEvent.cs
- TranslateTransform.cs
- ConstantSlot.cs
- FileDialogCustomPlaces.cs
- DrawingGroup.cs
- FontClient.cs
- RequestChannelBinder.cs
- ConfigurationManagerHelperFactory.cs
- TextStore.cs
- NetNamedPipeSecurityMode.cs
- ISAPIApplicationHost.cs