Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ServiceDefaults.cs
- XmlAutoDetectWriter.cs
- precedingquery.cs
- BamlReader.cs
- RelationshipType.cs
- coordinatorfactory.cs
- Rect.cs
- XmlNullResolver.cs
- ContextMarshalException.cs
- ProvidersHelper.cs
- Model3DCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- XPathNodeList.cs
- CustomErrorCollection.cs
- CaseStatement.cs
- GridErrorDlg.cs
- SessionEndedEventArgs.cs
- XmlQueryStaticData.cs
- MarshalDirectiveException.cs
- LabelLiteral.cs
- ThemeInfoAttribute.cs
- DesignerToolStripControlHost.cs
- IconHelper.cs
- SortKey.cs
- DbReferenceCollection.cs
- HtmlToClrEventProxy.cs
- ActiveDesignSurfaceEvent.cs
- XmlUTF8TextWriter.cs
- FixedTextSelectionProcessor.cs
- ParameterCollectionEditor.cs
- WindowsStartMenu.cs
- BamlLocalizer.cs
- TemplateXamlParser.cs
- JsonSerializer.cs
- WaitHandle.cs
- DataGridViewRowCancelEventArgs.cs
- SqlConnectionStringBuilder.cs
- WindowClosedEventArgs.cs
- MSG.cs
- TemplateField.cs
- ObjectQueryExecutionPlan.cs
- AttachedPropertyMethodSelector.cs
- GiveFeedbackEventArgs.cs
- ObjectListFieldsPage.cs
- GridViewEditEventArgs.cs
- ContextProperty.cs
- ToolStripKeyboardHandlingService.cs
- ObjectParameter.cs
- System.Data.OracleClient_BID.cs
- FunctionQuery.cs
- OleDbParameterCollection.cs
- XmlSchemaFacet.cs
- ManualResetEventSlim.cs
- PixelFormatConverter.cs
- CodeStatement.cs
- TextOnlyOutput.cs
- TypeBuilderInstantiation.cs
- X509Extension.cs
- StyleCollection.cs
- DataGridViewColumnConverter.cs
- Attributes.cs
- ListControl.cs
- Baml2006ReaderContext.cs
- HttpFileCollection.cs
- log.cs
- MailHeaderInfo.cs
- CustomBinding.cs
- DataGridViewColumnConverter.cs
- _ListenerRequestStream.cs
- DataGridColumnCollection.cs
- ResourcePermissionBase.cs
- ActivityXamlServices.cs
- UpdatePanelTrigger.cs
- StrongNamePublicKeyBlob.cs
- TileBrush.cs
- StorageScalarPropertyMapping.cs
- _LocalDataStoreMgr.cs
- ImmutableObjectAttribute.cs
- MapPathBasedVirtualPathProvider.cs
- AllMembershipCondition.cs
- ErrorHandler.cs
- IndicCharClassifier.cs
- PerformanceCounterCategory.cs
- ObjectDataSourceEventArgs.cs
- Pen.cs
- XmlSchemaSimpleTypeRestriction.cs
- XmlParserContext.cs
- WebPartVerbCollection.cs
- HashRepartitionStream.cs
- Aes.cs
- RequestQueue.cs
- Message.cs
- ClientSettingsSection.cs
- TemplateXamlParser.cs
- UrlMapping.cs
- CustomCategoryAttribute.cs
- SQLCharsStorage.cs
- EntityProviderFactory.cs
- TrackBarDesigner.cs
- StdRegProviderWrapper.cs