Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionConsumerAttribute.cs / 1305376 / ConnectionConsumerAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Reflection; [AttributeUsage(AttributeTargets.Method)] public class ConnectionConsumerAttribute : Attribute { private string _displayName; private string _id; private Type _connectionPointType; private bool _allowsMultipleConnections; public ConnectionConsumerAttribute(string displayName) { if (String.IsNullOrEmpty(displayName)) { throw new ArgumentNullException("displayName"); } _displayName = displayName; _allowsMultipleConnections = false; } public ConnectionConsumerAttribute(string displayName, string id) : this(displayName) { if (String.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } _id = id; } public ConnectionConsumerAttribute(string displayName, Type connectionPointType) : this(displayName) { if (connectionPointType == null) { throw new ArgumentNullException("connectionPointType"); } _connectionPointType = connectionPointType; } public ConnectionConsumerAttribute(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*/ true)) { return _connectionPointType; } else { throw new InvalidOperationException(SR.GetString( SR.ConnectionConsumerAttribute_InvalidConnectionPointType, _connectionPointType.Name)); } } } } } // 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.ComponentModel; using System.Reflection; [AttributeUsage(AttributeTargets.Method)] public class ConnectionConsumerAttribute : Attribute { private string _displayName; private string _id; private Type _connectionPointType; private bool _allowsMultipleConnections; public ConnectionConsumerAttribute(string displayName) { if (String.IsNullOrEmpty(displayName)) { throw new ArgumentNullException("displayName"); } _displayName = displayName; _allowsMultipleConnections = false; } public ConnectionConsumerAttribute(string displayName, string id) : this(displayName) { if (String.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } _id = id; } public ConnectionConsumerAttribute(string displayName, Type connectionPointType) : this(displayName) { if (connectionPointType == null) { throw new ArgumentNullException("connectionPointType"); } _connectionPointType = connectionPointType; } public ConnectionConsumerAttribute(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*/ true)) { return _connectionPointType; } else { throw new InvalidOperationException(SR.GetString( SR.ConnectionConsumerAttribute_InvalidConnectionPointType, _connectionPointType.Name)); } } } } } // 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
- SemanticResolver.cs
- RegexStringValidatorAttribute.cs
- Visual3D.cs
- BypassElementCollection.cs
- WpfSharedBamlSchemaContext.cs
- RuleRefElement.cs
- WS2007FederationHttpBindingElement.cs
- NullableFloatMinMaxAggregationOperator.cs
- InitializationEventAttribute.cs
- RepeaterItem.cs
- ScriptReferenceBase.cs
- PreservationFileWriter.cs
- Globals.cs
- FileLogRecordStream.cs
- TransferRequestHandler.cs
- WebAdminConfigurationHelper.cs
- TemplateControlBuildProvider.cs
- WebPartsPersonalization.cs
- ToolStripProgressBar.cs
- SharedPerformanceCounter.cs
- HyperLinkField.cs
- HwndKeyboardInputProvider.cs
- RijndaelManaged.cs
- OdbcConnectionHandle.cs
- ProcessInfo.cs
- ProgramNode.cs
- InputMethodStateChangeEventArgs.cs
- XmlIgnoreAttribute.cs
- HttpStreamXmlDictionaryWriter.cs
- IssuanceLicense.cs
- WsatTransactionInfo.cs
- CounterCreationDataCollection.cs
- LockedAssemblyCache.cs
- Property.cs
- X509Certificate2Collection.cs
- Figure.cs
- PerformanceCounters.cs
- GiveFeedbackEventArgs.cs
- LongMinMaxAggregationOperator.cs
- Config.cs
- XmlSchemaSimpleType.cs
- GeneralTransform3DGroup.cs
- SafeNativeMethodsOther.cs
- EmptyImpersonationContext.cs
- Regex.cs
- BaseContextMenu.cs
- IHttpResponseInternal.cs
- GridItemPatternIdentifiers.cs
- ContentElementAutomationPeer.cs
- Viewport3DVisual.cs
- IntegerValidator.cs
- MembershipPasswordException.cs
- WorkflowWebService.cs
- ACE.cs
- SqlDependencyUtils.cs
- MaterializeFromAtom.cs
- SecurityChannelFactory.cs
- Debug.cs
- SchemaCollectionPreprocessor.cs
- HttpResponseBase.cs
- SecurityDocument.cs
- KeyValueInternalCollection.cs
- TypeConstant.cs
- HijriCalendar.cs
- EventLogPermissionAttribute.cs
- ExtendedProperty.cs
- Logging.cs
- PerformanceCounter.cs
- EmbeddedMailObjectCollectionEditor.cs
- Compiler.cs
- SystemIPInterfaceStatistics.cs
- OrderingInfo.cs
- SimpleNameService.cs
- DbProviderFactories.cs
- MetadataItemSerializer.cs
- Peer.cs
- RemotingServices.cs
- ClientTargetSection.cs
- FlowLayoutPanel.cs
- StreamResourceInfo.cs
- PropertyCollection.cs
- XPathException.cs
- IconHelper.cs
- DeviceSpecificChoiceCollection.cs
- ProtocolsConfiguration.cs
- DoubleUtil.cs
- PagerSettings.cs
- ThreadStateException.cs
- ToolStripItemRenderEventArgs.cs
- TextEditorParagraphs.cs
- JpegBitmapEncoder.cs
- Table.cs
- ColorDialog.cs
- ResourceWriter.cs
- uribuilder.cs
- ResourceProviderFactory.cs
- StringSource.cs
- XhtmlTextWriter.cs
- DefaultProxySection.cs
- Margins.cs