Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1305376 / 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
- StoreAnnotationsMap.cs
- DataFormats.cs
- SHA512.cs
- UrlSyndicationContent.cs
- HTMLTagNameToTypeMapper.cs
- SqlErrorCollection.cs
- TdsRecordBufferSetter.cs
- ExtensionsSection.cs
- Int64AnimationUsingKeyFrames.cs
- DesignerWebPartChrome.cs
- ConversionContext.cs
- DataPager.cs
- PasswordBox.cs
- Screen.cs
- Utility.cs
- PhysicalFontFamily.cs
- CurrencyWrapper.cs
- FontWeights.cs
- Transform.cs
- LogSwitch.cs
- ContainerCodeDomSerializer.cs
- FormatterServices.cs
- cookiecollection.cs
- FillBehavior.cs
- Enum.cs
- HtmlInputImage.cs
- BrowserTree.cs
- FilteredDataSetHelper.cs
- EventSetter.cs
- TextHintingModeValidation.cs
- Permission.cs
- SqlConnectionPoolGroupProviderInfo.cs
- NTAccount.cs
- WaveHeader.cs
- ErrorWrapper.cs
- ReflectionTypeLoadException.cs
- SQLSingleStorage.cs
- dbdatarecord.cs
- Keywords.cs
- ReadOnlyDataSourceView.cs
- PolyLineSegment.cs
- LoginCancelEventArgs.cs
- DescendentsWalker.cs
- ContourSegment.cs
- NavigationHelper.cs
- MsmqBindingFilter.cs
- ElementsClipboardData.cs
- CultureInfoConverter.cs
- ColumnMapVisitor.cs
- DiagnosticTrace.cs
- SiteMapNodeCollection.cs
- SchemaObjectWriter.cs
- ObjectDataSourceEventArgs.cs
- DefaultPropertyAttribute.cs
- WebPartConnectionsCloseVerb.cs
- MultiPageTextView.cs
- DbConnectionOptions.cs
- KeyboardDevice.cs
- InvalidPipelineStoreException.cs
- DoubleConverter.cs
- RelatedView.cs
- ComplusEndpointConfigContainer.cs
- StrokeFIndices.cs
- RelationshipEnd.cs
- InternalConfigEventArgs.cs
- ConstraintStruct.cs
- DataGridTableCollection.cs
- DeferredTextReference.cs
- TextReader.cs
- PagePropertiesChangingEventArgs.cs
- XmlSerializerNamespaces.cs
- SetterBase.cs
- PageRouteHandler.cs
- TextViewBase.cs
- InternalConfigRoot.cs
- ExpressionPrefixAttribute.cs
- HtmlTitle.cs
- DataSourceCacheDurationConverter.cs
- ProfileProvider.cs
- UIElementCollection.cs
- LinearGradientBrush.cs
- EventWaitHandleSecurity.cs
- IPEndPoint.cs
- ReflectionServiceProvider.cs
- ActivitiesCollection.cs
- COM2ExtendedTypeConverter.cs
- QilXmlReader.cs
- IsolatedStoragePermission.cs
- WindowsSecurityTokenAuthenticator.cs
- ErrorHandlingAcceptor.cs
- SHA1.cs
- HttpHeaderCollection.cs
- JumpList.cs
- WindowsTokenRoleProvider.cs
- PersonalizationStateInfoCollection.cs
- COAUTHINFO.cs
- ServerValidateEventArgs.cs
- Font.cs
- JsonSerializer.cs
- Stroke.cs