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
- UnsafeNativeMethods.cs
- FrameworkElement.cs
- ControllableStoryboardAction.cs
- StyleSelector.cs
- ControlParameter.cs
- CopyAction.cs
- XmlCharCheckingWriter.cs
- thaishape.cs
- DesignerPerfEventProvider.cs
- Utils.cs
- SrgsToken.cs
- PrimitiveXmlSerializers.cs
- ColumnCollection.cs
- ObjectDataSourceMethodEventArgs.cs
- CallbackBehaviorAttribute.cs
- newitemfactory.cs
- DependencyPropertyAttribute.cs
- XmlDsigSep2000.cs
- HtmlFormWrapper.cs
- DesignerVerbCollection.cs
- BlockUIContainer.cs
- IRCollection.cs
- PortCache.cs
- DocumentPageViewAutomationPeer.cs
- ActivityPropertyReference.cs
- GeneralTransform3DGroup.cs
- ChannelServices.cs
- XPathNodeList.cs
- CompareValidator.cs
- AnnotationResourceCollection.cs
- PrincipalPermissionMode.cs
- ValidationSummary.cs
- DetailsViewModeEventArgs.cs
- AnimatedTypeHelpers.cs
- ViewBase.cs
- ChainedAsyncResult.cs
- SafeHandles.cs
- FigureParaClient.cs
- SizeF.cs
- ImageAttributes.cs
- StylusShape.cs
- SqlVisitor.cs
- Converter.cs
- WebHttpSecurity.cs
- SmtpReplyReaderFactory.cs
- LineGeometry.cs
- AnimationTimeline.cs
- DefaultAsyncDataDispatcher.cs
- DataGridViewRowCancelEventArgs.cs
- TextSegment.cs
- AsyncPostBackErrorEventArgs.cs
- HttpEncoderUtility.cs
- ContentIterators.cs
- SocketException.cs
- DesignerView.Commands.cs
- brushes.cs
- ToolStripContentPanel.cs
- UInt32Converter.cs
- IPHostEntry.cs
- HttpCacheVaryByContentEncodings.cs
- TextRangeProviderWrapper.cs
- DriveInfo.cs
- WasNotInstalledException.cs
- GroupBox.cs
- TextEditorSpelling.cs
- DataGridDesigner.cs
- ColumnCollection.cs
- RawStylusInput.cs
- UpdateTranslator.cs
- SecUtil.cs
- TemplatePropertyEntry.cs
- validationstate.cs
- FormsAuthentication.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DeviceContext.cs
- SqlClientPermission.cs
- DbInsertCommandTree.cs
- ISO2022Encoding.cs
- Int16Storage.cs
- SafeNativeMethods.cs
- LinkTarget.cs
- CodeAssignStatement.cs
- BitmapFrameDecode.cs
- GPPOINTF.cs
- DirectoryInfo.cs
- ProvidersHelper.cs
- GeometryGroup.cs
- AuthorizationRule.cs
- CodeAttributeDeclarationCollection.cs
- TextContainerChangeEventArgs.cs
- RelationshipDetailsRow.cs
- LayoutEvent.cs
- VirtualizedItemPattern.cs
- SelectorAutomationPeer.cs
- DecimalAnimationUsingKeyFrames.cs
- infer.cs
- RedistVersionInfo.cs
- XamlUtilities.cs
- ProviderIncompatibleException.cs
- SoapUnknownHeader.cs