Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebParts / ProxyWebPartManager.cs / 1 / ProxyWebPartManager.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; using System.Web.UI; [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.ProxyWebPartManagerDesigner, " + AssemblyRef.SystemDesign), NonVisualControl(), ParseChildren(true), PersistChildren(false) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ProxyWebPartManager : Control { private ProxyWebPartConnectionCollection _staticConnections; [ EditorBrowsable(EditorBrowsableState.Never), ] public override string ClientID { get { return base.ClientID; } } [ EditorBrowsable(EditorBrowsableState.Never), ] public override ControlCollection Controls { get { return base.Controls; } } [ DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool EnableTheming { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } [ DefaultValue(""), EditorBrowsable(EditorBrowsableState.Never), ] public override string SkinID { get { return String.Empty; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } [ DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), EditorBrowsable(EditorBrowsableState.Never), MergableProperty(false), PersistenceMode(PersistenceMode.InnerProperty), WebCategory("Behavior"), WebSysDescription(SR.WebPartManager_StaticConnections), ] public ProxyWebPartConnectionCollection StaticConnections { get { if (_staticConnections == null) { _staticConnections = new ProxyWebPartConnectionCollection(); } return _staticConnections; } } [ Browsable(false), DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool Visible { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.ControlNonVisual, this.GetType().Name)); } } protected override ControlCollection CreateControlCollection() { return new EmptyControlCollection(this); } [ EditorBrowsable(EditorBrowsableState.Never), ] public override void Focus() { throw new NotSupportedException(SR.GetString(SR.NoFocusSupport, this.GetType().Name)); } protected internal override void OnInit(EventArgs e) { base.OnInit(e); Page page = Page; Debug.Assert(page != null); if ((page != null) && !DesignMode) { WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(page); if (webPartManager == null) { throw new InvalidOperationException(SR.GetString(SR.WebPartManagerRequired)); } StaticConnections.SetWebPartManager(webPartManager); } } } } // 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.ComponentModel; using System.Diagnostics; using System.Security.Permissions; using System.Web.UI; [ Bindable(false), Designer("System.Web.UI.Design.WebControls.WebParts.ProxyWebPartManagerDesigner, " + AssemblyRef.SystemDesign), NonVisualControl(), ParseChildren(true), PersistChildren(false) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ProxyWebPartManager : Control { private ProxyWebPartConnectionCollection _staticConnections; [ EditorBrowsable(EditorBrowsableState.Never), ] public override string ClientID { get { return base.ClientID; } } [ EditorBrowsable(EditorBrowsableState.Never), ] public override ControlCollection Controls { get { return base.Controls; } } [ DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool EnableTheming { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } [ DefaultValue(""), EditorBrowsable(EditorBrowsableState.Never), ] public override string SkinID { get { return String.Empty; } set { throw new NotSupportedException(SR.GetString(SR.NoThemingSupport, this.GetType().Name)); } } [ DefaultValue(null), DesignerSerializationVisibility(DesignerSerializationVisibility.Content), EditorBrowsable(EditorBrowsableState.Never), MergableProperty(false), PersistenceMode(PersistenceMode.InnerProperty), WebCategory("Behavior"), WebSysDescription(SR.WebPartManager_StaticConnections), ] public ProxyWebPartConnectionCollection StaticConnections { get { if (_staticConnections == null) { _staticConnections = new ProxyWebPartConnectionCollection(); } return _staticConnections; } } [ Browsable(false), DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), ] public override bool Visible { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.ControlNonVisual, this.GetType().Name)); } } protected override ControlCollection CreateControlCollection() { return new EmptyControlCollection(this); } [ EditorBrowsable(EditorBrowsableState.Never), ] public override void Focus() { throw new NotSupportedException(SR.GetString(SR.NoFocusSupport, this.GetType().Name)); } protected internal override void OnInit(EventArgs e) { base.OnInit(e); Page page = Page; Debug.Assert(page != null); if ((page != null) && !DesignMode) { WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(page); if (webPartManager == null) { throw new InvalidOperationException(SR.GetString(SR.WebPartManagerRequired)); } StaticConnections.SetWebPartManager(webPartManager); } } } } // 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
- TransformerInfoCollection.cs
- PerformanceCounterCategory.cs
- EventManager.cs
- CssClassPropertyAttribute.cs
- XmlSchemaImporter.cs
- Overlapped.cs
- DbParameterHelper.cs
- SubclassTypeValidatorAttribute.cs
- WindowsListViewItemStartMenu.cs
- InternalCache.cs
- XmlArrayItemAttributes.cs
- SectionInformation.cs
- FileReader.cs
- Task.cs
- EntityTypeBase.cs
- EnumDataContract.cs
- TextBoxRenderer.cs
- ElementMarkupObject.cs
- StringSource.cs
- DownloadProgressEventArgs.cs
- JsonDeserializer.cs
- _UncName.cs
- TemplateControlBuildProvider.cs
- UTF32Encoding.cs
- ControlPaint.cs
- RemotingSurrogateSelector.cs
- ClientTargetSection.cs
- NameObjectCollectionBase.cs
- XhtmlBasicCommandAdapter.cs
- GroupByExpressionRewriter.cs
- NavigationWindow.cs
- CommonRemoteMemoryBlock.cs
- PartitionerStatic.cs
- PropertyStore.cs
- StoreItemCollection.cs
- ImageListUtils.cs
- BlockUIContainer.cs
- ConfigXmlAttribute.cs
- sqlinternaltransaction.cs
- AffineTransform3D.cs
- DbgUtil.cs
- System.Data_BID.cs
- Menu.cs
- ReferenceEqualityComparer.cs
- CreateUserWizardDesigner.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- QueryOptionExpression.cs
- SqlNodeAnnotation.cs
- HtmlElementCollection.cs
- ThrowHelper.cs
- MbpInfo.cs
- PackageDocument.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- MessageParameterAttribute.cs
- Types.cs
- IsolatedStorageException.cs
- TailCallAnalyzer.cs
- ChtmlImageAdapter.cs
- Stacktrace.cs
- BaseResourcesBuildProvider.cs
- SelectionGlyphBase.cs
- LayoutTable.cs
- HasCopySemanticsAttribute.cs
- PromptEventArgs.cs
- BCryptNative.cs
- ReferencedType.cs
- HeaderFilter.cs
- PropertyChangedEventManager.cs
- DataGridViewCell.cs
- MenuTracker.cs
- TraceContextEventArgs.cs
- SchemaElementDecl.cs
- Line.cs
- UnsafeNativeMethods.cs
- sortedlist.cs
- PartBasedPackageProperties.cs
- RootBuilder.cs
- ObjectHelper.cs
- OptimizerPatterns.cs
- TypeInfo.cs
- RegexInterpreter.cs
- PopupRootAutomationPeer.cs
- D3DImage.cs
- mediaclock.cs
- WorkflowOperationContext.cs
- Util.cs
- SecureUICommand.cs
- UserNamePasswordClientCredential.cs
- MessageDroppedTraceRecord.cs
- HashStream.cs
- XmlEnumAttribute.cs
- Convert.cs
- HostElement.cs
- SqlReferenceCollection.cs
- DictionarySectionHandler.cs
- PerformanceCounterPermissionEntry.cs
- OutputScopeManager.cs
- LogRestartAreaEnumerator.cs
- ResourceReferenceKeyNotFoundException.cs
- EndpointConfigContainer.cs