Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionProviderAttribute.cs / 1 / ConnectionProviderAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Reflection; using System.Security.Permissions; [AttributeUsage(AttributeTargets.Method)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ConnectionProviderAttribute : Attribute { private string _displayName; private string _id; private Type _connectionPointType; private bool _allowsMultipleConnections; public ConnectionProviderAttribute(string displayName) { if (String.IsNullOrEmpty(displayName)) { throw new ArgumentNullException("displayName"); } _displayName = displayName; _allowsMultipleConnections = true; } public ConnectionProviderAttribute(string displayName, string id) : this(displayName) { if (String.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } _id = id; } public ConnectionProviderAttribute(string displayName, Type connectionPointType) : this(displayName) { if (connectionPointType == null) { throw new ArgumentNullException("connectionPointType"); } _connectionPointType = connectionPointType; } public ConnectionProviderAttribute(string displayName, string id, Type connectionPointType) : this(displayName, connectionPointType) { if (String.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } _id = id; } public bool AllowsMultipleConnections { get { return _allowsMultipleConnections; } set { _allowsMultipleConnections = value; } } public string ID { get { return (_id != null) ? _id : String.Empty; } } public virtual string DisplayName { get { return DisplayNameValue; } } protected string DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public Type ConnectionPointType { get { if (WebPartUtil.IsConnectionPointTypeValid(_connectionPointType, /*isConsumer*/ false)) { return _connectionPointType; } else { throw new InvalidOperationException(SR.GetString( SR.ConnectionProviderAttribute_InvalidConnectionPointType, _connectionPointType.Name)); } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputGestureCollection.cs
- PropertyManager.cs
- TreeNode.cs
- DataColumn.cs
- SortDescription.cs
- ServicesSection.cs
- StorageMappingItemCollection.cs
- CompilerError.cs
- AssemblyInfo.cs
- ThemeDirectoryCompiler.cs
- UserNamePasswordValidator.cs
- TemplateFactory.cs
- AutomationPropertyInfo.cs
- SymLanguageType.cs
- ConnectionStringSettings.cs
- EDesignUtil.cs
- TypeConverterHelper.cs
- XmlElementAttributes.cs
- MailBnfHelper.cs
- EditorPartCollection.cs
- SqlClientWrapperSmiStream.cs
- InvalidEnumArgumentException.cs
- LookupBindingPropertiesAttribute.cs
- InheritablePropertyChangeInfo.cs
- ArraySortHelper.cs
- ValidatedMobileControlConverter.cs
- CustomWebEventKey.cs
- SqlUserDefinedTypeAttribute.cs
- BoundPropertyEntry.cs
- InputEventArgs.cs
- Socket.cs
- WebPartCloseVerb.cs
- ConfigurationPropertyAttribute.cs
- ConstraintCollection.cs
- XmlSortKey.cs
- bidPrivateBase.cs
- ItemCheckEvent.cs
- CodeEntryPointMethod.cs
- DocumentsTrace.cs
- SubMenuStyle.cs
- MouseButtonEventArgs.cs
- SafeRegistryHandle.cs
- RenderData.cs
- OneOfScalarConst.cs
- NumberFormatInfo.cs
- StrokeIntersection.cs
- PolicyManager.cs
- ClientData.cs
- RelationshipEndCollection.cs
- AuthenticationSection.cs
- DecoderFallbackWithFailureFlag.cs
- TokenBasedSet.cs
- CompareValidator.cs
- WinInetCache.cs
- FrameworkReadOnlyPropertyMetadata.cs
- SchemaType.cs
- FontConverter.cs
- NativeMethods.cs
- SerTrace.cs
- CharacterMetrics.cs
- InlinedLocationReference.cs
- DataChangedEventManager.cs
- ApplicationServiceHelper.cs
- _LoggingObject.cs
- MexTcpBindingCollectionElement.cs
- ThousandthOfEmRealDoubles.cs
- DecoderBestFitFallback.cs
- ValidatedControlConverter.cs
- SizeConverter.cs
- EventLogPermissionEntryCollection.cs
- PrintPreviewDialog.cs
- DataGrid.cs
- BStrWrapper.cs
- EventLogEntryCollection.cs
- CultureInfoConverter.cs
- RijndaelManagedTransform.cs
- RenamedEventArgs.cs
- FontDifferentiator.cs
- EventManager.cs
- XsltSettings.cs
- SafeCryptContextHandle.cs
- _SSPIWrapper.cs
- QueryExecutionOption.cs
- ImageField.cs
- SafeRightsManagementPubHandle.cs
- ObjectRef.cs
- ErrorTolerantObjectWriter.cs
- Point3DCollection.cs
- QueryResult.cs
- ComAdminInterfaces.cs
- isolationinterop.cs
- MsmqPoisonMessageException.cs
- WebDescriptionAttribute.cs
- XmlNode.cs
- ToolStripActionList.cs
- CollectionViewSource.cs
- OperatingSystem.cs
- TaiwanLunisolarCalendar.cs
- CacheSection.cs
- DbConnectionPool.cs