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
- ListViewInsertedEventArgs.cs
- XPathPatternBuilder.cs
- ColorConvertedBitmap.cs
- Parser.cs
- XmlCharType.cs
- UriParserTemplates.cs
- querybuilder.cs
- QuaternionRotation3D.cs
- WebPartVerb.cs
- EncryptedType.cs
- PagesSection.cs
- NetCodeGroup.cs
- TreeViewImageIndexConverter.cs
- MimePart.cs
- Selection.cs
- WebProxyScriptElement.cs
- FieldMetadata.cs
- ListSortDescription.cs
- HttpHandlerActionCollection.cs
- StateFinalizationActivity.cs
- CompiledRegexRunnerFactory.cs
- SQLInt16.cs
- KeyValuePair.cs
- ForwardPositionQuery.cs
- FixedSOMPageElement.cs
- ExcludePathInfo.cs
- ColorAnimationUsingKeyFrames.cs
- MembershipValidatePasswordEventArgs.cs
- ResXResourceSet.cs
- SequenceDesigner.cs
- SystemException.cs
- HScrollProperties.cs
- FrameworkContentElementAutomationPeer.cs
- SkewTransform.cs
- PauseStoryboard.cs
- WebBrowsableAttribute.cs
- ReflectTypeDescriptionProvider.cs
- TypefaceCollection.cs
- ListItemCollection.cs
- UriSection.cs
- IdnMapping.cs
- OdbcReferenceCollection.cs
- ProxyAttribute.cs
- PassportAuthentication.cs
- XamlInt32CollectionSerializer.cs
- DefaultSerializationProviderAttribute.cs
- FieldTemplateUserControl.cs
- HtmlInputRadioButton.cs
- SerializationStore.cs
- ObjectDataSourceEventArgs.cs
- DataBindingExpressionBuilder.cs
- TrackingDataItemValue.cs
- SizeAnimation.cs
- CheckBoxList.cs
- Soap.cs
- UnsafeNativeMethods.cs
- CultureMapper.cs
- SmiGettersStream.cs
- DefaultExpressionVisitor.cs
- CriticalFinalizerObject.cs
- InstanceDescriptor.cs
- CodeTypeParameterCollection.cs
- QilXmlReader.cs
- GenericUriParser.cs
- SecurityTokenProvider.cs
- SystemColors.cs
- TextCharacters.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ping.cs
- InternalResources.cs
- TrustManagerPromptUI.cs
- WebPartConnectionsCancelEventArgs.cs
- WsdlParser.cs
- MessageHeaderT.cs
- RequestCacheEntry.cs
- HttpContextBase.cs
- TextBounds.cs
- WindowsGrip.cs
- Throw.cs
- ToolStripCustomTypeDescriptor.cs
- XmlSchemaValidationException.cs
- ServiceSecurityAuditElement.cs
- GeometryModel3D.cs
- ListViewItemMouseHoverEvent.cs
- SchemaObjectWriter.cs
- PageContent.cs
- XmlElementAttribute.cs
- PolicyLevel.cs
- Transform3DGroup.cs
- SerializationInfo.cs
- TextPointer.cs
- ItemType.cs
- WpfXamlMember.cs
- DispatcherTimer.cs
- Peer.cs
- DriveInfo.cs
- DesignerTransactionCloseEvent.cs
- CheckBox.cs
- versioninfo.cs
- EncoderBestFitFallback.cs