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
- TPLETWProvider.cs
- ComEventsInfo.cs
- codemethodreferenceexpression.cs
- ScriptResourceInfo.cs
- TableLayoutSettings.cs
- ScrollProviderWrapper.cs
- AssemblySettingAttributes.cs
- IntegerCollectionEditor.cs
- SafeLocalMemHandle.cs
- WindowClosedEventArgs.cs
- InternalConfigRoot.cs
- XmlChildEnumerator.cs
- InvalidContentTypeException.cs
- InkSerializer.cs
- DataControlField.cs
- WebPart.cs
- PersonalizationProviderHelper.cs
- Listbox.cs
- IApplicationTrustManager.cs
- UpdatePanelControlTrigger.cs
- DbProviderFactory.cs
- XmlMemberMapping.cs
- ZeroOpNode.cs
- LineUtil.cs
- Queue.cs
- HtmlInputButton.cs
- BufferedReadStream.cs
- GraphicsContainer.cs
- FontUnit.cs
- WorkBatch.cs
- DoubleLinkList.cs
- DesignerAdapterAttribute.cs
- FormatVersion.cs
- MultiBindingExpression.cs
- StringSource.cs
- LabelLiteral.cs
- SHA256Managed.cs
- NumberFormatInfo.cs
- ScalarConstant.cs
- XmlUtf8RawTextWriter.cs
- ContentType.cs
- ManagedCodeMarkers.cs
- DataObjectEventArgs.cs
- CorrelationQueryBehavior.cs
- DecryptedHeader.cs
- WindowsFormsHostPropertyMap.cs
- InsufficientMemoryException.cs
- WebServiceReceive.cs
- BaseProcessor.cs
- WindowsListViewItemStartMenu.cs
- FileSecurity.cs
- PageHandlerFactory.cs
- Operators.cs
- CompareValidator.cs
- MetadataPropertyCollection.cs
- OdbcHandle.cs
- OTFRasterizer.cs
- DataSourceXmlAttributeAttribute.cs
- ETagAttribute.cs
- ExpandedWrapper.cs
- RtfControls.cs
- BoundField.cs
- TextElementCollection.cs
- CheckedPointers.cs
- XPathDocument.cs
- MinMaxParagraphWidth.cs
- OracleConnectionString.cs
- LinkDesigner.cs
- XmlValueConverter.cs
- FrameworkElementFactory.cs
- DbDataSourceEnumerator.cs
- AccessDataSource.cs
- SHA512.cs
- SqlException.cs
- ErrorFormatterPage.cs
- CodeDomConfigurationHandler.cs
- EmbeddedMailObjectsCollection.cs
- MethodImplAttribute.cs
- ProfileService.cs
- RtfToXamlLexer.cs
- XmlNodeComparer.cs
- TextEditorSpelling.cs
- DataTableTypeConverter.cs
- ParameterCollection.cs
- ViewManager.cs
- TextTreeInsertUndoUnit.cs
- OperationInvokerBehavior.cs
- WebConfigurationManager.cs
- Schema.cs
- FocusWithinProperty.cs
- Int32Collection.cs
- IntSecurity.cs
- ErrorHandlerModule.cs
- XPathAncestorQuery.cs
- ProxyAssemblyNotLoadedException.cs
- TextMetrics.cs
- ObjectMemberMapping.cs
- RijndaelManaged.cs
- ExponentialEase.cs
- ValidationRuleCollection.cs