Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PropertyRef.cs
- Console.cs
- StylusLogic.cs
- SafeNativeMethods.cs
- DetailsViewDeletedEventArgs.cs
- PackageRelationshipCollection.cs
- FrameworkContentElement.cs
- EDesignUtil.cs
- ListViewItemEventArgs.cs
- InnerItemCollectionView.cs
- HyperLinkStyle.cs
- DataGridViewControlCollection.cs
- Stroke2.cs
- BaseTemplateParser.cs
- ToolStripHighContrastRenderer.cs
- XsltFunctions.cs
- DataGridRelationshipRow.cs
- DefaultValueTypeConverter.cs
- CodeTypeDelegate.cs
- ControlCommandSet.cs
- PolicyLevel.cs
- CreateUserWizardAutoFormat.cs
- Group.cs
- XmlNullResolver.cs
- SqlMethodTransformer.cs
- MessageQueuePermissionAttribute.cs
- NavigationEventArgs.cs
- MDIWindowDialog.cs
- DataGridViewRowHeaderCell.cs
- Italic.cs
- WebProxyScriptElement.cs
- MarkupProperty.cs
- DiscoveryService.cs
- TrackingStringDictionary.cs
- CssStyleCollection.cs
- QueryContinueDragEventArgs.cs
- MenuEventArgs.cs
- XPathArrayIterator.cs
- FormsAuthenticationTicket.cs
- PropertyGeneratedEventArgs.cs
- ConnectionPointCookie.cs
- _AcceptOverlappedAsyncResult.cs
- ServiceInfo.cs
- SamlAction.cs
- FontDifferentiator.cs
- PageContentAsyncResult.cs
- HtmlInputControl.cs
- EventLogger.cs
- BuildResult.cs
- DynamicValueConverter.cs
- ReliabilityContractAttribute.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SqlDataSourceView.cs
- FontFamilyIdentifier.cs
- CompleteWizardStep.cs
- PluralizationServiceUtil.cs
- CapabilitiesRule.cs
- SqlFileStream.cs
- SimpleWorkerRequest.cs
- Transform.cs
- ButtonPopupAdapter.cs
- ModifiableIteratorCollection.cs
- PtsCache.cs
- DataGridBoolColumn.cs
- PackWebResponse.cs
- HtmlLink.cs
- WindowsListViewScroll.cs
- DateTimeConstantAttribute.cs
- SpStreamWrapper.cs
- ComponentResourceKeyConverter.cs
- ProtocolsConfigurationEntry.cs
- NodeCounter.cs
- streamingZipPartStream.cs
- ToolStripSeparator.cs
- DataGridViewRowsRemovedEventArgs.cs
- FileDialog_Vista.cs
- DelimitedListTraceListener.cs
- GlobalItem.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- WindowsTokenRoleProvider.cs
- ResumeStoryboard.cs
- SupportsEventValidationAttribute.cs
- CornerRadiusConverter.cs
- ControlParser.cs
- SecondaryViewProvider.cs
- DbDataReader.cs
- DataGridViewRow.cs
- FileLoadException.cs
- PagePropertiesChangingEventArgs.cs
- QueueException.cs
- MeasureItemEvent.cs
- FeatureManager.cs
- AccessKeyManager.cs
- UrlParameterWriter.cs
- TextParagraph.cs
- XmlReflectionMember.cs
- DesignerHelpers.cs
- SequenceNumber.cs
- DictationGrammar.cs
- DrawingContext.cs