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 / ConsumerConnectionPoint.cs / 1 / ConsumerConnectionPoint.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Reflection; using System.Security.Permissions; using System.Web; using System.Web.Util; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ConsumerConnectionPoint : ConnectionPoint { // Used by WebPartManager to verify the custom ConnectionPoint type has // the correct constructor signature. internal static readonly Type[] ConstructorTypes; static ConsumerConnectionPoint() { ConstructorInfo constructor = typeof(ConsumerConnectionPoint).GetConstructors()[0]; ConstructorTypes = WebPartUtil.GetTypesForConstructor(constructor); } public ConsumerConnectionPoint(MethodInfo callbackMethod, Type interfaceType, Type controlType, string displayName, string id, bool allowsMultipleConnections) : base( callbackMethod, interfaceType, controlType, displayName, id, allowsMultipleConnections) { } public virtual void SetObject(Control control, object data) { if (control == null) { throw new ArgumentNullException("control"); } CallbackMethod.Invoke(control, new object[] {data}); } ////// Base implementation returns true, can be overridden by subclasses to return /// true or false conditionally based on the available secondary interfaces and the state /// of the consumer WebPart passed in. /// public virtual bool SupportsConnection(Control control, ConnectionInterfaceCollection secondaryInterfaces) { return true; } } } // 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.Reflection; using System.Security.Permissions; using System.Web; using System.Web.Util; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ConsumerConnectionPoint : ConnectionPoint { // Used by WebPartManager to verify the custom ConnectionPoint type has // the correct constructor signature. internal static readonly Type[] ConstructorTypes; static ConsumerConnectionPoint() { ConstructorInfo constructor = typeof(ConsumerConnectionPoint).GetConstructors()[0]; ConstructorTypes = WebPartUtil.GetTypesForConstructor(constructor); } public ConsumerConnectionPoint(MethodInfo callbackMethod, Type interfaceType, Type controlType, string displayName, string id, bool allowsMultipleConnections) : base( callbackMethod, interfaceType, controlType, displayName, id, allowsMultipleConnections) { } public virtual void SetObject(Control control, object data) { if (control == null) { throw new ArgumentNullException("control"); } CallbackMethod.Invoke(control, new object[] {data}); } ////// Base implementation returns true, can be overridden by subclasses to return /// true or false conditionally based on the available secondary interfaces and the state /// of the consumer WebPart passed in. /// public virtual bool SupportsConnection(Control control, ConnectionInterfaceCollection secondaryInterfaces) { return true; } } } // 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
- MetadataArtifactLoaderFile.cs
- HttpHandlerActionCollection.cs
- CreateParams.cs
- DialogResultConverter.cs
- ExpressionLexer.cs
- MethodCallConverter.cs
- StringBlob.cs
- ListView.cs
- DataGridClipboardHelper.cs
- Container.cs
- BaseParaClient.cs
- HostExecutionContextManager.cs
- XmlSerializationGeneratedCode.cs
- PeerEndPoint.cs
- InstanceStoreQueryResult.cs
- ModuleConfigurationInfo.cs
- MultiBinding.cs
- NavigateEvent.cs
- TCEAdapterGenerator.cs
- XmlNamespaceManager.cs
- CategoryList.cs
- XmlSchemaRedefine.cs
- Site.cs
- DeleteMemberBinder.cs
- TileBrush.cs
- EntityDataSourceColumn.cs
- ThemeDirectoryCompiler.cs
- HtmlContainerControl.cs
- UDPClient.cs
- Menu.cs
- ErrorRuntimeConfig.cs
- Range.cs
- PrivilegedConfigurationManager.cs
- ReadOnlyHierarchicalDataSource.cs
- SendingRequestEventArgs.cs
- SafeEventHandle.cs
- ScriptResourceInfo.cs
- PresentationAppDomainManager.cs
- HitTestDrawingContextWalker.cs
- WebColorConverter.cs
- GraphicsState.cs
- wgx_commands.cs
- sqlpipe.cs
- WaitForChangedResult.cs
- SimpleHandlerBuildProvider.cs
- EntityClassGenerator.cs
- Region.cs
- WorkflowDesigner.cs
- HMACSHA1.cs
- ProcessModuleDesigner.cs
- TrackingQuery.cs
- FontInfo.cs
- CompareValidator.cs
- HttpChannelBindingToken.cs
- TextWriter.cs
- ExitEventArgs.cs
- DockAndAnchorLayout.cs
- PerfCounters.cs
- QilIterator.cs
- DoubleLinkList.cs
- TextLineResult.cs
- Thumb.cs
- WrapperEqualityComparer.cs
- DirtyTextRange.cs
- ListControlActionList.cs
- SafeCryptContextHandle.cs
- WriterOutput.cs
- PeerObject.cs
- CqlGenerator.cs
- PropertyEmitter.cs
- GACMembershipCondition.cs
- ImportContext.cs
- UriSection.cs
- XmlSchemaType.cs
- MaterialGroup.cs
- XhtmlBasicValidatorAdapter.cs
- AffineTransform3D.cs
- DataGridRelationshipRow.cs
- PaperSize.cs
- MgmtConfigurationRecord.cs
- MailWebEventProvider.cs
- LinqDataSourceInsertEventArgs.cs
- ClientRoleProvider.cs
- Root.cs
- SecurityPermission.cs
- CompositeKey.cs
- ToolStripEditorManager.cs
- SafeArrayTypeMismatchException.cs
- PathBox.cs
- CompilationSection.cs
- SingleTagSectionHandler.cs
- PropertyChangedEventManager.cs
- Point.cs
- ImagingCache.cs
- SqlCharStream.cs
- ContextBase.cs
- EnumBuilder.cs
- InstanceHandle.cs
- AnnotationMap.cs
- LiteralDesigner.cs