Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionPoint.cs / 1 / ConnectionPoint.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; ////// A ConnectionPoint defines a possible connection. A WebPart uses this /// to define the connections it can provide or consume. /// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public abstract class ConnectionPoint { private MethodInfo _callbackMethod; private Type _controlType; private Type _interfaceType; private string _displayName; private string _id; private bool _allowsMultipleConnections; // We do not want the public field to be "const", since that means we can never change its value. // We want the internal const field so we can use it in attributes. public static readonly string DefaultID = DefaultIDInternal; internal const string DefaultIDInternal = "default"; // internal ConnectionPoint(MethodInfo callbackMethod, Type interfaceType, Type controlType, string displayName, string id, bool allowsMultipleConnections) { if (callbackMethod == null) { throw new ArgumentNullException("callbackMethod"); } if (interfaceType == null) { throw new ArgumentNullException("interfaceType"); } if (controlType == null) { throw new ArgumentNullException("controlType"); } if (!controlType.IsSubclassOf(typeof(Control))) { throw new ArgumentException(SR.GetString(SR.ConnectionPoint_InvalidControlType), "controlType"); } if (String.IsNullOrEmpty(displayName)) { throw new ArgumentNullException("displayName"); } _callbackMethod = callbackMethod; _interfaceType = interfaceType; _controlType = controlType; _displayName = displayName; _id = id; _allowsMultipleConnections = allowsMultipleConnections; } public bool AllowsMultipleConnections { get { return _allowsMultipleConnections; } } internal MethodInfo CallbackMethod { get { return _callbackMethod; } } public Type ControlType { get { return _controlType; } } public Type InterfaceType { get { return _interfaceType; } } public string ID { get { return (!String.IsNullOrEmpty(_id)) ? _id : DefaultID; } } public string DisplayName { get { return _displayName; } } ////// Base implementation returns true, can be overridden by subclasses to return /// true or false conditionally based on the state of the Control. /// public virtual bool GetEnabled(Control control) { return true; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RayMeshGeometry3DHitTestResult.cs
- SecurityContextSecurityTokenParameters.cs
- ImmutableObjectAttribute.cs
- WorkflowMarkupSerializer.cs
- LogStore.cs
- IdlingCommunicationPool.cs
- RequiredFieldValidator.cs
- ToolboxDataAttribute.cs
- PropertyDescriptor.cs
- wgx_sdk_version.cs
- Queue.cs
- ReservationNotFoundException.cs
- SecurityRuntime.cs
- CheckBoxBaseAdapter.cs
- MimeTypeMapper.cs
- Parameter.cs
- XamlFxTrace.cs
- CodeChecksumPragma.cs
- sqlcontext.cs
- MessagingDescriptionAttribute.cs
- MetadataArtifactLoaderCompositeFile.cs
- CatalogPartChrome.cs
- Matrix3DConverter.cs
- XmlConvert.cs
- BaseTemplateBuildProvider.cs
- ContourSegment.cs
- documentation.cs
- FragmentQueryProcessor.cs
- CacheVirtualItemsEvent.cs
- SynchronizedDispatch.cs
- SecurityTokenValidationException.cs
- UrlEncodedParameterWriter.cs
- ManifestResourceInfo.cs
- SendingRequestEventArgs.cs
- ChooseAction.cs
- PropertyMetadata.cs
- EpmSyndicationContentSerializer.cs
- StorageEntityTypeMapping.cs
- SchemaImporterExtension.cs
- RedirectionProxy.cs
- OperatingSystem.cs
- PackageProperties.cs
- LazyTextWriterCreator.cs
- FontFamily.cs
- DataTablePropertyDescriptor.cs
- ReadOnlyTernaryTree.cs
- ThemeDictionaryExtension.cs
- HttpClientProtocol.cs
- ThemeDictionaryExtension.cs
- InstalledFontCollection.cs
- PixelShader.cs
- COM2FontConverter.cs
- IOException.cs
- EventPropertyMap.cs
- ClientRuntimeConfig.cs
- ExpandCollapsePattern.cs
- PrivilegeNotHeldException.cs
- EdmScalarPropertyAttribute.cs
- RepeatInfo.cs
- HttpWebRequest.cs
- ThicknessConverter.cs
- Vector3DCollectionConverter.cs
- SQLRoleProvider.cs
- TextEditorThreadLocalStore.cs
- EntityDataSourceDataSelection.cs
- ISFTagAndGuidCache.cs
- CodeSnippetExpression.cs
- FontStretches.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- FormViewDeletedEventArgs.cs
- CodeCommentStatement.cs
- DSACryptoServiceProvider.cs
- OdbcParameter.cs
- ScriptingScriptResourceHandlerSection.cs
- QuaternionRotation3D.cs
- MediaSystem.cs
- BufferModeSettings.cs
- CompoundFileStorageReference.cs
- FamilyTypefaceCollection.cs
- Geometry3D.cs
- AddingNewEventArgs.cs
- MethodCallConverter.cs
- GeneralTransform3DGroup.cs
- TableItemProviderWrapper.cs
- XamlToRtfWriter.cs
- DocumentScope.cs
- TextDocumentView.cs
- XmlSignatureProperties.cs
- SelectionProcessor.cs
- RegexCompiler.cs
- ImageProxy.cs
- AsyncStreamReader.cs
- FontStretchConverter.cs
- WorkflowRuntimeEndpoint.cs
- UnsafeNativeMethods.cs
- CodeTypeDeclarationCollection.cs
- Separator.cs
- PerformanceCountersElement.cs
- ZipIORawDataFileBlock.cs
- ProgressBarRenderer.cs