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
- SessionStateContainer.cs
- FillRuleValidation.cs
- Parsers.cs
- BindingMemberInfo.cs
- CodeExporter.cs
- PerformanceCounterPermissionEntry.cs
- WizardStepBase.cs
- ObjectSet.cs
- BinaryWriter.cs
- TriState.cs
- ObjectRef.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- _IPv6Address.cs
- Condition.cs
- XmlILAnnotation.cs
- DiscoveryUtility.cs
- TypeDescriptor.cs
- CommonXSendMessage.cs
- CopyOnWriteList.cs
- BookmarkEventArgs.cs
- SQLDoubleStorage.cs
- FlatButtonAppearance.cs
- AddressHeaderCollection.cs
- FunctionQuery.cs
- DefaultParameterValueAttribute.cs
- DeferredRunTextReference.cs
- UserControlBuildProvider.cs
- ResourceSetExpression.cs
- Pair.cs
- AssertFilter.cs
- TreeNodeEventArgs.cs
- ISFTagAndGuidCache.cs
- CodeParameterDeclarationExpressionCollection.cs
- ScriptResourceAttribute.cs
- UrlMappingsSection.cs
- AccessText.cs
- SymmetricAlgorithm.cs
- SymbolType.cs
- NGCSerializer.cs
- TcpClientSocketManager.cs
- MultitargetUtil.cs
- AppSecurityManager.cs
- XmlSchemaInclude.cs
- QilLoop.cs
- ChineseLunisolarCalendar.cs
- RijndaelManagedTransform.cs
- NamedElement.cs
- ChangePasswordAutoFormat.cs
- AutomationPropertyInfo.cs
- ListDictionaryInternal.cs
- UpdateProgress.cs
- EntityKey.cs
- SerialPinChanges.cs
- UpdatePanelTrigger.cs
- TrackingRecordPreFilter.cs
- WindowsHyperlink.cs
- TextParagraph.cs
- ToolStripTextBox.cs
- ConvertTextFrag.cs
- PublisherIdentityPermission.cs
- XmlValidatingReader.cs
- RemoteWebConfigurationHostStream.cs
- SelectingProviderEventArgs.cs
- ObjectPropertyMapping.cs
- ColumnClickEvent.cs
- cryptoapiTransform.cs
- TokenBasedSetEnumerator.cs
- InfiniteTimeSpanConverter.cs
- DbXmlEnabledProviderManifest.cs
- IntegerCollectionEditor.cs
- ListViewSortEventArgs.cs
- QueueProcessor.cs
- AppSettingsReader.cs
- DropTarget.cs
- IdentityReference.cs
- CodeDelegateInvokeExpression.cs
- SupportsEventValidationAttribute.cs
- CreateRefExpr.cs
- PropertyEmitterBase.cs
- PaperSize.cs
- PassportIdentity.cs
- SBCSCodePageEncoding.cs
- WindowsListViewItemStartMenu.cs
- CommandDevice.cs
- MultipleCopiesCollection.cs
- HTMLTextWriter.cs
- CodeExpressionRuleDeclaration.cs
- SingletonConnectionReader.cs
- GeometryGroup.cs
- QueryStatement.cs
- JavaScriptObjectDeserializer.cs
- GeneratedContractType.cs
- Evidence.cs
- XmlIlTypeHelper.cs
- IOException.cs
- PatternMatcher.cs
- ConfigUtil.cs
- ProofTokenCryptoHandle.cs
- CharStorage.cs
- GridViewRowPresenterBase.cs