Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ZipIOCentralDirectoryBlock.cs
- SqlBuffer.cs
- Add.cs
- Animatable.cs
- OdbcConnectionHandle.cs
- PersonalizationProviderCollection.cs
- TemplateControlParser.cs
- EventData.cs
- ButtonField.cs
- CallbackValidatorAttribute.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- FloaterBaseParaClient.cs
- StorageEntityTypeMapping.cs
- WebPartEventArgs.cs
- GeneratedView.cs
- VideoDrawing.cs
- IntSecurity.cs
- ComponentTray.cs
- CodeNamespaceCollection.cs
- AppDomain.cs
- ListViewItem.cs
- DialogResultConverter.cs
- PasswordTextContainer.cs
- MultiPropertyDescriptorGridEntry.cs
- JumpTask.cs
- TemplateAction.cs
- OutputCacheSettingsSection.cs
- Merger.cs
- GCHandleCookieTable.cs
- ConstructorBuilder.cs
- XPathNodeIterator.cs
- TrustLevelCollection.cs
- PaperSource.cs
- SymLanguageType.cs
- MeasureItemEvent.cs
- InputManager.cs
- OleStrCAMarshaler.cs
- UTF32Encoding.cs
- BoolExpression.cs
- AQNBuilder.cs
- InternalBase.cs
- RelationshipNavigation.cs
- SurrogateSelector.cs
- DbParameterHelper.cs
- StatusBar.cs
- XmlIlGenerator.cs
- DefaultTextStore.cs
- storagemappingitemcollection.viewdictionary.cs
- UnsafeNativeMethods.cs
- ClientFormsAuthenticationCredentials.cs
- LineServicesCallbacks.cs
- TemplatedAdorner.cs
- cookiecollection.cs
- SessionPageStateSection.cs
- HashHelper.cs
- ComboBox.cs
- InstancePersistenceException.cs
- ToolboxItemFilterAttribute.cs
- IPAddressCollection.cs
- IsolatedStorageFile.cs
- ImageButton.cs
- InstanceDataCollection.cs
- TextReader.cs
- TextParagraphProperties.cs
- DataObjectEventArgs.cs
- CultureMapper.cs
- OdbcError.cs
- Size.cs
- SafePointer.cs
- FontWeight.cs
- TypeBrowserDialog.cs
- Dictionary.cs
- ReadOnlyPropertyMetadata.cs
- GridViewColumnCollectionChangedEventArgs.cs
- HebrewNumber.cs
- NavigationEventArgs.cs
- BindingSource.cs
- EmptyControlCollection.cs
- GreenMethods.cs
- SecurityContext.cs
- SourceItem.cs
- BaseValidatorDesigner.cs
- CodeCommentStatement.cs
- StylusPoint.cs
- HttpRequestCacheValidator.cs
- TripleDES.cs
- CommandTreeTypeHelper.cs
- DataControlFieldHeaderCell.cs
- ItemsChangedEventArgs.cs
- Span.cs
- XPathNodeHelper.cs
- SplineKeyFrames.cs
- DateTimeSerializationSection.cs
- HttpProtocolImporter.cs
- DataTemplateKey.cs
- HelpOperationInvoker.cs
- DbTypeMap.cs
- Visitors.cs
- UserControl.cs
- DataGridHeaderBorder.cs