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
- BufferedReadStream.cs
- DataGridViewCell.cs
- MultipleViewPattern.cs
- ReflectionServiceProvider.cs
- AccessDataSource.cs
- ToolStripSystemRenderer.cs
- ScrollItemProviderWrapper.cs
- FixedNode.cs
- ObjectPropertyMapping.cs
- ArgumentReference.cs
- MeshGeometry3D.cs
- ProxyGenerator.cs
- StatusBarPanelClickEvent.cs
- StandardCommands.cs
- PerformanceCounterPermissionEntryCollection.cs
- FieldNameLookup.cs
- XPathArrayIterator.cs
- LayoutManager.cs
- WMIInterop.cs
- OutputCacheSettingsSection.cs
- PathGradientBrush.cs
- IsolatedStorageFilePermission.cs
- AdRotator.cs
- SqlDuplicator.cs
- ExpressionCopier.cs
- RightsManagementPermission.cs
- WindowsClaimSet.cs
- EntityDataSourceWizardForm.cs
- TraceRecords.cs
- BamlCollectionHolder.cs
- RunClient.cs
- XmlLinkedNode.cs
- HelpEvent.cs
- AsyncMethodInvoker.cs
- OracleDataAdapter.cs
- TransactionsSectionGroup.cs
- XmlDesignerDataSourceView.cs
- X509ScopedServiceCertificateElement.cs
- CommandHelper.cs
- StylusPoint.cs
- DataRelation.cs
- TableCellCollection.cs
- TagMapInfo.cs
- SqlCacheDependencySection.cs
- DataSourceControl.cs
- ExpressionCopier.cs
- SHA384Managed.cs
- UnauthorizedWebPart.cs
- EntityContainerEntitySet.cs
- MyContact.cs
- ObjectDataSourceDisposingEventArgs.cs
- ToolboxItemImageConverter.cs
- GuidConverter.cs
- Timer.cs
- DataRecordInfo.cs
- MetadataImporter.cs
- WindowPatternIdentifiers.cs
- ApplicationInterop.cs
- BaseCodePageEncoding.cs
- MatrixAnimationBase.cs
- NumericUpDownAcceleration.cs
- WebPartEditorOkVerb.cs
- CodeSnippetCompileUnit.cs
- GlyphingCache.cs
- WbmpConverter.cs
- PageParser.cs
- ScriptServiceAttribute.cs
- NativeMethods.cs
- TargetInvocationException.cs
- DbDataSourceEnumerator.cs
- NavigationHelper.cs
- PopOutPanel.cs
- FrameDimension.cs
- SQLDateTime.cs
- SqlColumnizer.cs
- GeometryCombineModeValidation.cs
- TemplateBindingExpression.cs
- SelectionRangeConverter.cs
- DocumentViewerHelper.cs
- UserPreferenceChangingEventArgs.cs
- PageFunction.cs
- XmlBaseReader.cs
- ChangePassword.cs
- RelationalExpressions.cs
- PropertyItemInternal.cs
- DesignerActionUIStateChangeEventArgs.cs
- CopyCodeAction.cs
- BitArray.cs
- RemotingAttributes.cs
- EpmHelper.cs
- XmlTypeMapping.cs
- UInt16Converter.cs
- PropertyStore.cs
- itemelement.cs
- StructuredTypeEmitter.cs
- PaperSize.cs
- CustomPopupPlacement.cs
- Page.cs
- JoinGraph.cs