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
- ISAPIWorkerRequest.cs
- PairComparer.cs
- StreamReader.cs
- Point3DConverter.cs
- RectangleF.cs
- TabItem.cs
- fixedPageContentExtractor.cs
- Filter.cs
- DesigntimeLicenseContext.cs
- CriticalExceptions.cs
- DataGridViewCheckBoxColumn.cs
- FontSourceCollection.cs
- TextDpi.cs
- CommonGetThemePartSize.cs
- DbConnectionHelper.cs
- ToolStripRenderEventArgs.cs
- HealthMonitoringSectionHelper.cs
- HtmlDocument.cs
- QueryParameter.cs
- GeometryDrawing.cs
- EntityCommandExecutionException.cs
- CryptoProvider.cs
- TreeNodeSelectionProcessor.cs
- CryptoHelper.cs
- ServiceProviders.cs
- AspCompat.cs
- TableParaClient.cs
- _ConnectionGroup.cs
- XmlNavigatorFilter.cs
- ByteStream.cs
- SpellerInterop.cs
- ActivityExecutorDelegateInfo.cs
- ProtocolsConfigurationHandler.cs
- ComponentDispatcher.cs
- HostingPreferredMapPath.cs
- Semaphore.cs
- RequestCachePolicy.cs
- MemoryPressure.cs
- DictionarySurrogate.cs
- WindowsGraphics.cs
- FamilyMapCollection.cs
- GetPageCompletedEventArgs.cs
- Attributes.cs
- HandlerBase.cs
- UnsafeNativeMethodsCLR.cs
- ImmutableAssemblyCacheEntry.cs
- RawStylusInputCustomDataList.cs
- EFDataModelProvider.cs
- Rfc2898DeriveBytes.cs
- NetworkInterface.cs
- QilVisitor.cs
- OutputCacheSection.cs
- Baml2006SchemaContext.cs
- smtpconnection.cs
- StructureChangedEventArgs.cs
- XsdBuildProvider.cs
- ToolStripItemRenderEventArgs.cs
- InputLanguageEventArgs.cs
- URLAttribute.cs
- DragSelectionMessageFilter.cs
- InternalConfigHost.cs
- ExpandoClass.cs
- Viewport2DVisual3D.cs
- ResourceAssociationSetEnd.cs
- safelink.cs
- ResourcePermissionBase.cs
- EncoderParameter.cs
- RotateTransform.cs
- ServerReliableChannelBinder.cs
- AnonymousIdentificationModule.cs
- util.cs
- QueryContinueDragEventArgs.cs
- XmlHierarchicalEnumerable.cs
- SelectionItemPattern.cs
- SqlTypeConverter.cs
- OverlappedAsyncResult.cs
- MaskedTextProvider.cs
- ChildTable.cs
- Point3DCollection.cs
- GPRECT.cs
- ArrayTypeMismatchException.cs
- Rect.cs
- HttpPostedFile.cs
- PackagePartCollection.cs
- ManipulationLogic.cs
- Opcode.cs
- ConfigPathUtility.cs
- UnknownBitmapEncoder.cs
- SafeSecurityHandles.cs
- AutomationIdentifier.cs
- SettingsPropertyNotFoundException.cs
- GridSplitterAutomationPeer.cs
- TypedRowGenerator.cs
- ChildTable.cs
- X509ImageLogo.cs
- ToolZone.cs
- _ConnectStream.cs
- IriParsingElement.cs
- CompositeActivityTypeDescriptorProvider.cs
- SoapRpcMethodAttribute.cs