Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- _ReceiveMessageOverlappedAsyncResult.cs
- OutOfMemoryException.cs
- TreeNodeConverter.cs
- Misc.cs
- SafeRightsManagementEnvironmentHandle.cs
- PolyQuadraticBezierSegment.cs
- PageContentAsyncResult.cs
- DocumentReferenceCollection.cs
- WorkflowHostingResponseContext.cs
- DesignerSerializationOptionsAttribute.cs
- ListViewItemSelectionChangedEvent.cs
- XmlUtil.cs
- HostingEnvironmentSection.cs
- BinHexDecoder.cs
- ThicknessKeyFrameCollection.cs
- AsyncOperationContext.cs
- Grant.cs
- JoinGraph.cs
- SocketException.cs
- XmlSchemaSimpleType.cs
- TagMapCollection.cs
- CodeTryCatchFinallyStatement.cs
- Divide.cs
- SpellerStatusTable.cs
- CellTreeNodeVisitors.cs
- CodeDelegateInvokeExpression.cs
- RuntimeIdentifierPropertyAttribute.cs
- FileDialog.cs
- TagPrefixCollection.cs
- NativeMethods.cs
- AutomationProperties.cs
- HtmlTable.cs
- MultiByteCodec.cs
- WriteableOnDemandStream.cs
- ClassicBorderDecorator.cs
- SafeRegistryKey.cs
- DbConnectionStringBuilder.cs
- PerformanceCounterPermissionEntryCollection.cs
- TextRangeProviderWrapper.cs
- BinaryFormatterWriter.cs
- MetaTable.cs
- ToolBarButtonClickEvent.cs
- InputBindingCollection.cs
- TraceSource.cs
- Container.cs
- BinaryMethodMessage.cs
- TypeUnloadedException.cs
- _BasicClient.cs
- FreeFormDesigner.cs
- RtfFormatStack.cs
- RtfToken.cs
- CustomAttributeFormatException.cs
- CoreChannel.cs
- HttpPostProtocolImporter.cs
- LinkLabel.cs
- ErasingStroke.cs
- Utils.cs
- IUnknownConstantAttribute.cs
- CopyEncoder.cs
- ReferentialConstraint.cs
- TextRunCacheImp.cs
- ToolStripItemRenderEventArgs.cs
- RecognizedPhrase.cs
- SqlCharStream.cs
- ReadOnlyDataSourceView.cs
- Operand.cs
- Exception.cs
- Exception.cs
- UIElement.cs
- CapabilitiesState.cs
- XmlAtomicValue.cs
- ComponentEditorPage.cs
- AppDomainAttributes.cs
- DefaultPropertyAttribute.cs
- TextProviderWrapper.cs
- Literal.cs
- ClientSettingsStore.cs
- OpacityConverter.cs
- SafeNativeMethods.cs
- SocketStream.cs
- BrowserPolicyValidator.cs
- WindowsToolbarAsMenu.cs
- Int32Converter.cs
- StoreContentChangedEventArgs.cs
- SessionEndingEventArgs.cs
- SystemIPInterfaceStatistics.cs
- StyleBamlTreeBuilder.cs
- RowBinding.cs
- PreviewPageInfo.cs
- AdornerHitTestResult.cs
- ConnectionManagementElementCollection.cs
- OutputChannel.cs
- SkewTransform.cs
- GuidConverter.cs
- StyleXamlParser.cs
- StrongNameUtility.cs
- MenuItem.cs
- HasCopySemanticsAttribute.cs
- DbConnectionPoolCounters.cs
- CustomWebEventKey.cs