Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Bits.cs
- EdmSchemaAttribute.cs
- ConfigurationManagerHelperFactory.cs
- VolatileEnlistmentMultiplexing.cs
- RegexCaptureCollection.cs
- TraceContextEventArgs.cs
- ADConnectionHelper.cs
- DBProviderConfigurationHandler.cs
- AttributeExtensions.cs
- StructuredType.cs
- ConfigurationSchemaErrors.cs
- QuaternionAnimation.cs
- MimeObjectFactory.cs
- SubMenuStyleCollection.cs
- OleDbCommandBuilder.cs
- EventHandlers.cs
- Lasso.cs
- RegisteredDisposeScript.cs
- securitymgrsite.cs
- BlockUIContainer.cs
- HttpProcessUtility.cs
- FixedPageAutomationPeer.cs
- ProcessThreadCollection.cs
- HTMLTagNameToTypeMapper.cs
- ExpressionQuoter.cs
- DebugViewWriter.cs
- XsltConvert.cs
- Int32EqualityComparer.cs
- Reference.cs
- AutoGeneratedField.cs
- BitmapFrame.cs
- ExternalException.cs
- _AutoWebProxyScriptHelper.cs
- ResourceDescriptionAttribute.cs
- UTF8Encoding.cs
- TheQuery.cs
- AttributeEmitter.cs
- ConstraintConverter.cs
- WebPartCatalogAddVerb.cs
- OdbcCommand.cs
- XmlSiteMapProvider.cs
- GridItemPattern.cs
- InputProcessorProfilesLoader.cs
- ParseNumbers.cs
- InkPresenter.cs
- XappLauncher.cs
- TextMetrics.cs
- ImageMap.cs
- ForceCopyBuildProvider.cs
- EditorZone.cs
- HtmlButton.cs
- Duration.cs
- TraceContextRecord.cs
- StorageComplexPropertyMapping.cs
- StringExpressionSet.cs
- FileVersionInfo.cs
- KnownBoxes.cs
- XmlCustomFormatter.cs
- ContractNamespaceAttribute.cs
- BatchWriter.cs
- PropertyDescriptorGridEntry.cs
- SendingRequestEventArgs.cs
- PageAction.cs
- Set.cs
- InternalDispatchObject.cs
- PeerConnector.cs
- HMACMD5.cs
- LogReservationCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- DecimalAnimationBase.cs
- CodeTypeMemberCollection.cs
- Encoder.cs
- ObjRef.cs
- PropertyInfoSet.cs
- ChildDocumentBlock.cs
- ECDsa.cs
- WrappedOptions.cs
- UriSchemeKeyedCollection.cs
- CheckPair.cs
- ElementUtil.cs
- _NegotiateClient.cs
- HttpHandlerActionCollection.cs
- OuterGlowBitmapEffect.cs
- UnsafePeerToPeerMethods.cs
- DragAssistanceManager.cs
- CollectionDataContractAttribute.cs
- ExceptionValidationRule.cs
- DataSysAttribute.cs
- MembershipSection.cs
- WindowsFormsSynchronizationContext.cs
- CodeTypeDelegate.cs
- HttpCookiesSection.cs
- RoutedEventHandlerInfo.cs
- FtpCachePolicyElement.cs
- ContainerAction.cs
- Model3D.cs
- EntityType.cs
- Polygon.cs
- AdapterUtil.cs
- DrawingBrush.cs