Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DecoderBestFitFallback.cs
- Axis.cs
- WebConfigManager.cs
- ListView.cs
- IntSumAggregationOperator.cs
- MobileSysDescriptionAttribute.cs
- SafeLibraryHandle.cs
- TextDpi.cs
- ColorTranslator.cs
- ConfigurationPropertyAttribute.cs
- WebPartZone.cs
- InheritedPropertyChangedEventArgs.cs
- SortKey.cs
- XsdCachingReader.cs
- CompilerCollection.cs
- PlanCompilerUtil.cs
- FragmentNavigationEventArgs.cs
- ReadOnlyDataSourceView.cs
- MemoryMappedViewAccessor.cs
- _OSSOCK.cs
- KeyGesture.cs
- ListViewGroupItemCollection.cs
- XmlStreamStore.cs
- RegexCaptureCollection.cs
- _AutoWebProxyScriptEngine.cs
- ExtendLockAsyncResult.cs
- WebPartDisplayModeCancelEventArgs.cs
- JsonFormatReaderGenerator.cs
- Compiler.cs
- RsaSecurityTokenAuthenticator.cs
- ToolStripGripRenderEventArgs.cs
- XmlSchemaAttributeGroup.cs
- DataDesignUtil.cs
- BamlRecords.cs
- RightsController.cs
- _AutoWebProxyScriptWrapper.cs
- COM2IDispatchConverter.cs
- IPEndPointCollection.cs
- HttpCachePolicy.cs
- DataGridViewHitTestInfo.cs
- ScriptingSectionGroup.cs
- NativeWindow.cs
- AddressHeader.cs
- Stream.cs
- PowerStatus.cs
- HtmlMeta.cs
- CopyNamespacesAction.cs
- GridErrorDlg.cs
- ToolZoneDesigner.cs
- HttpContext.cs
- URIFormatException.cs
- DataGridRow.cs
- DataGridPagerStyle.cs
- LinkLabel.cs
- FileSystemWatcher.cs
- ErrorView.xaml.cs
- LocalBuilder.cs
- PathData.cs
- XmlSerializableServices.cs
- RegularExpressionValidator.cs
- TextViewSelectionProcessor.cs
- ToolboxCategoryItems.cs
- MSAAEventDispatcher.cs
- TabControlCancelEvent.cs
- IIS7WorkerRequest.cs
- ComboBoxAutomationPeer.cs
- DesignerSerializerAttribute.cs
- WebRequestModuleElementCollection.cs
- MediaEntryAttribute.cs
- WsdlContractConversionContext.cs
- PartBasedPackageProperties.cs
- CodeTypeDelegate.cs
- CorrelationManager.cs
- SafeRightsManagementEnvironmentHandle.cs
- DataGridViewLinkCell.cs
- ExpandCollapseProviderWrapper.cs
- TempEnvironment.cs
- RectValueSerializer.cs
- PageAsyncTask.cs
- OrderByBuilder.cs
- ClusterSafeNativeMethods.cs
- StrokeNodeEnumerator.cs
- infer.cs
- HyperLinkStyle.cs
- WebContext.cs
- RuntimeArgument.cs
- ThrowHelper.cs
- NativeMethods.cs
- PropertyNames.cs
- XmlDocumentSerializer.cs
- NumericUpDown.cs
- MessageRpc.cs
- ConfigurationManagerInternal.cs
- HtmlMeta.cs
- XmlSchemaSimpleTypeUnion.cs
- IconHelper.cs
- xml.cs
- EntityDesignerDataSourceView.cs
- Version.cs
- RayHitTestParameters.cs