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
- SourceFileInfo.cs
- CopyNodeSetAction.cs
- SqlCacheDependencyDatabase.cs
- EventSinkActivity.cs
- DbConnectionHelper.cs
- DataSourceXmlElementAttribute.cs
- RemoteWebConfigurationHost.cs
- XsdBuildProvider.cs
- CryptoProvider.cs
- ObjectSet.cs
- ADMembershipUser.cs
- UdpAnnouncementEndpoint.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- ResourceDisplayNameAttribute.cs
- DataBindingCollectionConverter.cs
- BitConverter.cs
- KeySplineConverter.cs
- ServiceContractListItem.cs
- DataTrigger.cs
- SmiEventSink_Default.cs
- SqlMethodCallConverter.cs
- OAVariantLib.cs
- SystemThemeKey.cs
- NativeWindow.cs
- WebSysDefaultValueAttribute.cs
- ProxyFragment.cs
- CodeGroup.cs
- XsltConvert.cs
- ClosableStream.cs
- DependentList.cs
- ADMembershipProvider.cs
- ErrorHandlingAcceptor.cs
- DeliveryStrategy.cs
- BindingObserver.cs
- StateMachineSubscriptionManager.cs
- IDispatchConstantAttribute.cs
- ClonableStack.cs
- XmlArrayItemAttribute.cs
- SamlDelegatingWriter.cs
- LinqExpressionNormalizer.cs
- OpenFileDialog.cs
- FontCacheUtil.cs
- HandlerWithFactory.cs
- DrawingState.cs
- ChildrenQuery.cs
- TimeSpanValidatorAttribute.cs
- TextSpanModifier.cs
- TransformGroup.cs
- DependencyPropertyKey.cs
- ElapsedEventArgs.cs
- SchemaNames.cs
- DataGridRowHeaderAutomationPeer.cs
- QueryPageSettingsEventArgs.cs
- ILGenerator.cs
- SQLDateTimeStorage.cs
- ContentAlignmentEditor.cs
- SaveFileDialog.cs
- PolicyManager.cs
- CollectionChangeEventArgs.cs
- PixelFormat.cs
- RegionInfo.cs
- FacetDescriptionElement.cs
- DataGridRow.cs
- MenuEventArgs.cs
- RoleManagerSection.cs
- HotCommands.cs
- MSAANativeProvider.cs
- AuthenticateEventArgs.cs
- Comparer.cs
- TypeResolvingOptionsAttribute.cs
- ProfileBuildProvider.cs
- DateTimeConverter.cs
- ForEachAction.cs
- SequentialUshortCollection.cs
- SmiSettersStream.cs
- Enlistment.cs
- FixedSOMContainer.cs
- LayoutManager.cs
- LayoutTableCell.cs
- ExcludeFromCodeCoverageAttribute.cs
- MemoryMappedFileSecurity.cs
- coordinatorfactory.cs
- WindowsStatusBar.cs
- HtmlToClrEventProxy.cs
- Rethrow.cs
- XmlLangPropertyAttribute.cs
- MaskedTextProvider.cs
- CollectionChangeEventArgs.cs
- RouteUrlExpressionBuilder.cs
- TypeInfo.cs
- WindowsToolbarItemAsMenuItem.cs
- TextBoxBase.cs
- XmlAttributes.cs
- FilterableAttribute.cs
- BaseUriHelper.cs
- TextContainer.cs
- BuildProviderCollection.cs
- ClaimSet.cs
- Type.cs
- PrivilegedConfigurationManager.cs