Code:
/ FX-1434 / FX-1434 / 1.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
- DataGridState.cs
- ConfigurationErrorsException.cs
- Visual3DCollection.cs
- FontFamilyConverter.cs
- WindowsScrollBarBits.cs
- MultilineStringEditor.cs
- WindowsStatic.cs
- OdbcConnectionHandle.cs
- XmlAttributes.cs
- ProxyWebPartConnectionCollection.cs
- regiisutil.cs
- ToolStripStatusLabel.cs
- EntityTransaction.cs
- DetailsViewActionList.cs
- PolicyStatement.cs
- InvalidProgramException.cs
- AjaxFrameworkAssemblyAttribute.cs
- BuildManager.cs
- DbMetaDataCollectionNames.cs
- BaseValidator.cs
- Base64Decoder.cs
- ColorAnimation.cs
- LabelDesigner.cs
- DbParameterCollection.cs
- PersonalizationProviderCollection.cs
- MatrixConverter.cs
- ToolStrip.cs
- QuaternionAnimation.cs
- GeneralTransform3D.cs
- _CookieModule.cs
- ParserOptions.cs
- XamlSerializerUtil.cs
- DataGridViewColumnCollection.cs
- CapabilitiesState.cs
- InstanceDataCollection.cs
- ViewLoader.cs
- PersonalizationEntry.cs
- ColorMap.cs
- ReaderWriterLock.cs
- EmptyEnumerator.cs
- ControlTemplate.cs
- ValueHandle.cs
- ToolStripLabel.cs
- EntityTypeEmitter.cs
- BaseResourcesBuildProvider.cs
- StorageAssociationTypeMapping.cs
- StrokeRenderer.cs
- SafeHandles.cs
- UpDownBase.cs
- QueryableFilterUserControl.cs
- TransactedReceiveScope.cs
- ServiceEndpointElement.cs
- TextEffect.cs
- NamedPipeHostedTransportConfiguration.cs
- SessionStateItemCollection.cs
- DataSourceView.cs
- SafeReversePInvokeHandle.cs
- DecimalStorage.cs
- ReadContentAsBinaryHelper.cs
- StringArrayEditor.cs
- BuildResult.cs
- TCEAdapterGenerator.cs
- MessageQueueInstaller.cs
- ServiceChannel.cs
- ControlPaint.cs
- ClientFormsIdentity.cs
- AssociationSet.cs
- StreamAsIStream.cs
- HttpCacheVaryByContentEncodings.cs
- ErrorProvider.cs
- Rect3DConverter.cs
- WebPartTracker.cs
- SoapMessage.cs
- DefaultValueAttribute.cs
- TypeNameParser.cs
- WindowsTab.cs
- ModelItemExtensions.cs
- latinshape.cs
- CharacterMetricsDictionary.cs
- DragEvent.cs
- GroupBox.cs
- CompilationPass2Task.cs
- XmlReaderDelegator.cs
- LayoutEditorPart.cs
- DbProviderFactories.cs
- XmlSchemaSimpleContentExtension.cs
- DiscardableAttribute.cs
- DataPagerCommandEventArgs.cs
- GridViewDeletedEventArgs.cs
- AccessibleObject.cs
- ControlPaint.cs
- ReadWriteSpinLock.cs
- EdmItemError.cs
- EnumType.cs
- ToolBarOverflowPanel.cs
- ValueProviderWrapper.cs
- FormViewCommandEventArgs.cs
- SelectionUIService.cs
- ResourceDisplayNameAttribute.cs
- COM2PropertyDescriptor.cs