Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionProviderAttribute.cs / 1305376 / ConnectionProviderAttribute.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 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)); } } } } } // 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 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)); } } } } } // 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
- PersonalizationProviderHelper.cs
- OperationValidationEventArgs.cs
- PreviewPrintController.cs
- InputScope.cs
- BrowserCapabilitiesFactory.cs
- UInt16Converter.cs
- SynchronousChannelMergeEnumerator.cs
- ConfigurationValues.cs
- securestring.cs
- XmlBinaryWriterSession.cs
- DPTypeDescriptorContext.cs
- PreservationFileReader.cs
- RootAction.cs
- EventHandlersStore.cs
- DirectionalLight.cs
- XamlToRtfWriter.cs
- TagPrefixCollection.cs
- Style.cs
- SchemaTableColumn.cs
- GcSettings.cs
- ConfigsHelper.cs
- UpdateRecord.cs
- QuestionEventArgs.cs
- BitmapEffectInputData.cs
- TimelineGroup.cs
- Style.cs
- HttpWebResponse.cs
- DataServiceKeyAttribute.cs
- StringUtil.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- XmlEncoding.cs
- Rectangle.cs
- FontNamesConverter.cs
- WpfXamlMember.cs
- FlowDocumentFormatter.cs
- CommentEmitter.cs
- CurrencyWrapper.cs
- RoleGroup.cs
- FamilyTypeface.cs
- CapabilitiesRule.cs
- DesignConnection.cs
- UnauthorizedWebPart.cs
- TreeView.cs
- SerializationInfoEnumerator.cs
- ContentPlaceHolder.cs
- InheritanceAttribute.cs
- StreamInfo.cs
- JoinSymbol.cs
- KeyPressEvent.cs
- AncestorChangedEventArgs.cs
- PenLineJoinValidation.cs
- RadioButtonBaseAdapter.cs
- KeyFrames.cs
- XPathSelfQuery.cs
- RuntimeConfigurationRecord.cs
- NullableFloatSumAggregationOperator.cs
- ResourcesGenerator.cs
- SignedXml.cs
- UserControl.cs
- TraceHandler.cs
- NegotiateStream.cs
- FrameworkElementFactoryMarkupObject.cs
- WebPartEventArgs.cs
- AssociationSetMetadata.cs
- XmlText.cs
- HttpContextServiceHost.cs
- HttpDebugHandler.cs
- TextEndOfParagraph.cs
- BitmapMetadataEnumerator.cs
- MimeObjectFactory.cs
- Vector.cs
- RequestChannelBinder.cs
- ApplicationHost.cs
- Symbol.cs
- EntityWrapper.cs
- SigningDialog.cs
- RoutedEventHandlerInfo.cs
- TcpClientSocketManager.cs
- SystemResources.cs
- DataServiceQueryContinuation.cs
- ObjectCloneHelper.cs
- InitialServerConnectionReader.cs
- UIElement.cs
- PerformanceCounterManager.cs
- TrustSection.cs
- ApplyTemplatesAction.cs
- RowParagraph.cs
- CodeVariableDeclarationStatement.cs
- DocumentAutomationPeer.cs
- OpenTypeMethods.cs
- PassportIdentity.cs
- SerialStream.cs
- StringDictionary.cs
- ClientTarget.cs
- PerformanceCounterTraceRecord.cs
- SqlCommandBuilder.cs
- Misc.cs
- WindowsRichEdit.cs
- UrlPath.cs
- ManualWorkflowSchedulerService.cs