Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConsumerConnectionPoint.cs / 1305376 / ConsumerConnectionPoint.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Reflection; using System.Web; using System.Web.Util; 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.Web; using System.Web.Util; 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
- EdmSchemaError.cs
- SqlConnectionFactory.cs
- ResourceDefaultValueAttribute.cs
- DataListItemEventArgs.cs
- SiteMapHierarchicalDataSourceView.cs
- DefaultObjectMappingItemCollection.cs
- FormParameter.cs
- BitmapCodecInfo.cs
- OletxVolatileEnlistment.cs
- HtmlTernaryTree.cs
- AtomContentProperty.cs
- StrokeIntersection.cs
- ToolboxComponentsCreatingEventArgs.cs
- ListControl.cs
- TextClipboardData.cs
- HybridDictionary.cs
- DeviceFilterDictionary.cs
- TdsParserStaticMethods.cs
- PermissionSetEnumerator.cs
- Drawing.cs
- SystemFonts.cs
- DataTrigger.cs
- ContentType.cs
- ListChangedEventArgs.cs
- streamingZipPartStream.cs
- RowSpanVector.cs
- TextModifier.cs
- WebDescriptionAttribute.cs
- NotFiniteNumberException.cs
- DataObjectCopyingEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- SectionUpdates.cs
- URL.cs
- HttpListenerRequest.cs
- ADMembershipUser.cs
- SHA512.cs
- LifetimeServices.cs
- BuildProvidersCompiler.cs
- MissingMethodException.cs
- FrugalList.cs
- FilteredDataSetHelper.cs
- CodeTryCatchFinallyStatement.cs
- HtmlTable.cs
- HttpAsyncResult.cs
- StringReader.cs
- DeferredTextReference.cs
- Transform.cs
- MembershipSection.cs
- TraceRecord.cs
- SynchronizationContext.cs
- Image.cs
- AsymmetricSignatureDeformatter.cs
- DataGridViewCellLinkedList.cs
- TableCellCollection.cs
- EventProviderClassic.cs
- PointCollectionValueSerializer.cs
- PriorityQueue.cs
- FlowDocumentReader.cs
- httpstaticobjectscollection.cs
- HScrollBar.cs
- JulianCalendar.cs
- PathFigureCollectionConverter.cs
- TextTrailingCharacterEllipsis.cs
- ReadOnlyAttribute.cs
- ArgumentDesigner.xaml.cs
- ExceptionHandler.cs
- SoapElementAttribute.cs
- BitmapImage.cs
- ArrayElementGridEntry.cs
- ProjectionPathSegment.cs
- OleDbReferenceCollection.cs
- IndexOutOfRangeException.cs
- UdpSocketReceiveManager.cs
- DataMisalignedException.cs
- ProxyWebPartManager.cs
- WebPartMenuStyle.cs
- TdsParserSessionPool.cs
- Splitter.cs
- ContentType.cs
- StaticSiteMapProvider.cs
- FontSourceCollection.cs
- Speller.cs
- FormViewInsertEventArgs.cs
- IriParsingElement.cs
- SpellerError.cs
- CaretElement.cs
- PolyLineSegment.cs
- BasicExpandProvider.cs
- CharAnimationBase.cs
- MetadataException.cs
- DbProviderFactories.cs
- DataSvcMapFile.cs
- LoadGrammarCompletedEventArgs.cs
- OdbcDataAdapter.cs
- PathStreamGeometryContext.cs
- TransformerConfigurationWizardBase.cs
- InitializerFacet.cs
- base64Transforms.cs
- ConnectionStringSettings.cs
- LookupTables.cs