Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeRemoveEventStatement.cs
- DispatcherEventArgs.cs
- PerformanceCounterCategory.cs
- HierarchicalDataBoundControlAdapter.cs
- HtmlTable.cs
- Authorization.cs
- HttpWebResponse.cs
- CommandExpr.cs
- AsyncPostBackErrorEventArgs.cs
- ApplicationDirectory.cs
- RequestDescription.cs
- Peer.cs
- InfiniteTimeSpanConverter.cs
- NativeMethods.cs
- FutureFactory.cs
- TTSEngineTypes.cs
- WebPartConnectionsConnectVerb.cs
- DirtyTextRange.cs
- LinkTarget.cs
- Simplifier.cs
- DesignOnlyAttribute.cs
- ColorMatrix.cs
- PolyLineSegment.cs
- SmtpAuthenticationManager.cs
- BuildProvider.cs
- ObjectNavigationPropertyMapping.cs
- ReflectionTypeLoadException.cs
- DataSourceHelper.cs
- MemoryPressure.cs
- Rotation3DAnimationUsingKeyFrames.cs
- OpenTypeCommon.cs
- ViewCellRelation.cs
- BrushValueSerializer.cs
- SizeConverter.cs
- Configuration.cs
- IArgumentProvider.cs
- RoleService.cs
- MetaForeignKeyColumn.cs
- WinFormsSpinner.cs
- ContextProperty.cs
- AccessKeyManager.cs
- ImageListUtils.cs
- DiscreteKeyFrames.cs
- BitmapInitialize.cs
- TransformerConfigurationWizardBase.cs
- DynamicPropertyReader.cs
- CrossAppDomainChannel.cs
- KeyGesture.cs
- ServiceDescription.cs
- FixedTextBuilder.cs
- FormCollection.cs
- ShapeTypeface.cs
- HttpRuntimeSection.cs
- XmlCodeExporter.cs
- HierarchicalDataSourceControl.cs
- FixedSOMTableRow.cs
- HttpInputStream.cs
- AnnotationAdorner.cs
- LogReservationCollection.cs
- BuildDependencySet.cs
- RegexInterpreter.cs
- HtmlElement.cs
- FocusWithinProperty.cs
- SaveFileDialog.cs
- ObjectListGeneralPage.cs
- DataContract.cs
- SafeThreadHandle.cs
- OpenFileDialog.cs
- NetworkInformationException.cs
- CommandBinding.cs
- ExpressionBinding.cs
- ClientBuildManagerCallback.cs
- ValueQuery.cs
- ClientEventManager.cs
- FixedSchema.cs
- OptimalBreakSession.cs
- ServiceHttpHandlerFactory.cs
- ZoneLinkButton.cs
- Vector3DCollection.cs
- RoleGroupCollection.cs
- QueryPageSettingsEventArgs.cs
- XamlGridLengthSerializer.cs
- HashCodeCombiner.cs
- autovalidator.cs
- DataDocumentXPathNavigator.cs
- ItemChangedEventArgs.cs
- XmlWrappingReader.cs
- StrongNameIdentityPermission.cs
- RectAnimation.cs
- TrustDriver.cs
- ExpressionPrinter.cs
- OdbcUtils.cs
- XmlRawWriter.cs
- CodePrimitiveExpression.cs
- ExtendedPropertyDescriptor.cs
- HttpHandlerAction.cs
- RuntimeWrappedException.cs
- TypeDependencyAttribute.cs
- TemplateParser.cs
- EventlogProvider.cs