Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } } } // 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
- PenLineCapValidation.cs
- ToolStripPanelRow.cs
- EntityClientCacheKey.cs
- ProcessMessagesAsyncResult.cs
- PersonalizationState.cs
- ListViewPagedDataSource.cs
- ReadWriteControlDesigner.cs
- WorkerRequest.cs
- CompareInfo.cs
- _NegoState.cs
- ImageSourceValueSerializer.cs
- SqlDataSourceView.cs
- MetafileHeaderWmf.cs
- SynthesizerStateChangedEventArgs.cs
- FrameworkReadOnlyPropertyMetadata.cs
- DelegatingStream.cs
- RefreshEventArgs.cs
- DataControlImageButton.cs
- UpdateTracker.cs
- ReliableSessionBindingElementImporter.cs
- SectionRecord.cs
- TransformGroup.cs
- UpdateException.cs
- CatalogPart.cs
- TextEditorParagraphs.cs
- ThreadStartException.cs
- RecognitionEventArgs.cs
- CfgParser.cs
- CompatibleIComparer.cs
- Oid.cs
- EraserBehavior.cs
- BinaryMethodMessage.cs
- PersistChildrenAttribute.cs
- AnimationException.cs
- __ComObject.cs
- lengthconverter.cs
- XhtmlBasicValidatorAdapter.cs
- FormCollection.cs
- LinkAreaEditor.cs
- TransformProviderWrapper.cs
- ZipIOExtraFieldZip64Element.cs
- ValidateNames.cs
- ClientSection.cs
- Errors.cs
- HtmlElementCollection.cs
- XmlUnspecifiedAttribute.cs
- AddIn.cs
- TextBlockAutomationPeer.cs
- IDispatchConstantAttribute.cs
- StrongNameKeyPair.cs
- RoutedUICommand.cs
- CommonProperties.cs
- TableItemStyle.cs
- ParseNumbers.cs
- BinaryWriter.cs
- NonVisualControlAttribute.cs
- DateTimeConverter2.cs
- TableProviderWrapper.cs
- ImportedPolicyConversionContext.cs
- PropertyTabAttribute.cs
- BaseAddressPrefixFilterElementCollection.cs
- XsdValidatingReader.cs
- RangeValidator.cs
- EntitySetBase.cs
- SafeArrayTypeMismatchException.cs
- HandlerBase.cs
- DetailsViewModeEventArgs.cs
- ValidationHelpers.cs
- StorageAssociationSetMapping.cs
- SystemInfo.cs
- ItemCheckedEvent.cs
- Selection.cs
- ClusterSafeNativeMethods.cs
- ComplexPropertyEntry.cs
- BindingMAnagerBase.cs
- SingleStorage.cs
- PropertyKey.cs
- FontStretchConverter.cs
- Char.cs
- TypeConverterHelper.cs
- SqlDataSourceCustomCommandEditor.cs
- XmlTypeMapping.cs
- GridViewRow.cs
- ConstrainedDataObject.cs
- InternalConfigEventArgs.cs
- BinaryFormatter.cs
- AsymmetricSignatureFormatter.cs
- AuthenticationConfig.cs
- CurrentTimeZone.cs
- RadioButtonPopupAdapter.cs
- SourceItem.cs
- URL.cs
- DesignerActionList.cs
- XmlnsCompatibleWithAttribute.cs
- DefaultAssemblyResolver.cs
- SplashScreen.cs
- ThreadInterruptedException.cs
- MethodCallTranslator.cs
- ResponseBodyWriter.cs
- SiteMapPathDesigner.cs