Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1 / AttributeProviderAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property)] public class AttributeProviderAttribute : Attribute { private string _typeName; private string _propertyName; ////// /// Creates a new AttributeProviderAttribute object. /// public AttributeProviderAttribute(string typeName) { if (typeName == null) { throw new ArgumentNullException("typeName"); } _typeName = typeName; } ////// /// Creates a new AttributeProviderAttribute object. /// public AttributeProviderAttribute(string typeName, string propertyName) { if (typeName == null) { throw new ArgumentNullException("typeName"); } if (propertyName == null) { throw new ArgumentNullException("propertyName"); } _typeName = typeName; _propertyName = propertyName; } ////// /// Creates a new AttributeProviderAttribute object. /// public AttributeProviderAttribute(Type type) { if (type == null) { throw new ArgumentNullException("type"); } _typeName = type.AssemblyQualifiedName; } ////// /// The TypeName property returns the assembly qualified type name /// passed into the constructor. /// public string TypeName { get { return _typeName; } } ////// /// The TypeName property returns the property name that will be used to query attributes from. /// public string PropertyName { get { return _propertyName; } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CharStorage.cs
- DataSourceCache.cs
- WebUtil.cs
- COSERVERINFO.cs
- EntityParameter.cs
- OciEnlistContext.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DesignerTextWriter.cs
- Base64Encoding.cs
- TransactionScope.cs
- OptimizedTemplateContentHelper.cs
- GridProviderWrapper.cs
- VersionPair.cs
- PasswordRecoveryDesigner.cs
- DataSourceCache.cs
- WebPart.cs
- TableHeaderCell.cs
- RelativeSource.cs
- MetadataItem.cs
- PeerContact.cs
- recordstatescratchpad.cs
- PlainXmlWriter.cs
- EncoderParameters.cs
- DispatcherHooks.cs
- CompoundFileStreamReference.cs
- Property.cs
- PathFigure.cs
- XhtmlBasicControlAdapter.cs
- DrawingVisual.cs
- Point.cs
- MenuItem.cs
- Page.cs
- XmlQueryType.cs
- ThreadStartException.cs
- ToolStripControlHost.cs
- LocatorGroup.cs
- RangeExpression.cs
- DtdParser.cs
- Win32.cs
- SqlCachedBuffer.cs
- SamlAuthorityBinding.cs
- SerializationSectionGroup.cs
- TaskFileService.cs
- ModelVisual3D.cs
- DynamicField.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- RemotingService.cs
- ToolStripOverflowButton.cs
- CompilerGeneratedAttribute.cs
- HTMLTagNameToTypeMapper.cs
- WebPartZoneAutoFormat.cs
- SourceItem.cs
- SystemInfo.cs
- LogicalMethodInfo.cs
- CommandDevice.cs
- TextCollapsingProperties.cs
- ToolBar.cs
- ChtmlTextWriter.cs
- ThreadExceptionDialog.cs
- TransactionFilter.cs
- TransactionFilter.cs
- ValueSerializerAttribute.cs
- WindowsStatic.cs
- documentation.cs
- FormViewUpdatedEventArgs.cs
- TextEffectCollection.cs
- DtdParser.cs
- SessionEndedEventArgs.cs
- Int32AnimationUsingKeyFrames.cs
- PassportAuthentication.cs
- TransportDefaults.cs
- StringAnimationUsingKeyFrames.cs
- MasterPageBuildProvider.cs
- SelectionHighlightInfo.cs
- MemoryMappedView.cs
- Label.cs
- TraceHandler.cs
- SecurityException.cs
- NodeInfo.cs
- ObjectDataSourceStatusEventArgs.cs
- QueryActivatableWorkflowsCommand.cs
- XmlLanguageConverter.cs
- HtmlHistory.cs
- WmlLinkAdapter.cs
- DataGrid.cs
- DPCustomTypeDescriptor.cs
- ImageFormatConverter.cs
- ToolStripManager.cs
- Expressions.cs
- WorkflowItemsPresenter.cs
- CatalogPart.cs
- CompiledELinqQueryState.cs
- DEREncoding.cs
- FormsAuthenticationTicket.cs
- RectangleGeometry.cs
- ClientOptions.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Error.cs
- TextProperties.cs
- VisualTreeHelper.cs